Cremaster muscle

[2] The cremaster muscle's function is to raise and lower the testes in order to regulate scrotal temperature for optimal spermatogenesis and survival of the resultant spermatozoa.

[3] Temperature is regulated by increasing or decreasing the exposed surface area of the surrounding tissue, allowing faster or slower dissipation of body heat.

[3] Cremaster works alongside the dartos muscle in order to maintain homeostasis for the reproductive organs and protect them from physical damage.

When a man is cold or sexually stimulated, the dartos muscle causes the scrotum to become more wrinkled and smaller as it is retracted closer to the body.

[5] The muscle may contract during moments of extreme fear, possibly to help avoid injuring the testes while dealing with a fight or flight situation.

Treatment for these spasms ranges from minor surgery to injection with Botulinum A toxin to the regular application of heat to relax the muscle.

Surgery, including the excision of the cremaster muscle, has apparently been able to provide complete relief from this condition without significant side effects.