Your symptom is known as retractile/ascending testicles. It is due to improper closure of the inguinal ring that stops testicular ascend into abdomen. Was it triggered due to some abdominal pulling up exercise like weight lifting ?, if so take care in future as the situation can reccur. If you Google for retractile testicle, you will get more info, though mostly realted to adolescent boys. Here is some related info :
Please consult a urologist for further help and guidance.