Testicular torsion often occurs several hours after vigorous activity, after a minor injury to the testicles or while sleeping. Cold temperature or rapid growth of the testicle during puberty also might play a role. Risk factors. Age. Testicular torsion is most common between ages 12 and 18.
https://www.mayoclinic.org/diseases-conditions/testicular-torsion/symptoms-causes/syc-20378270