Menstrual cramps are primarily caused by the contraction of the uterus to shed its lining. These contractions are triggered by prostaglandins, hormone-like substances involved in pain and inflammation. Higher levels of prostaglandins are often associated with more severe menstrual cramps. Conditions such as endometriosis, adenomyosis, and uterine fibroids can also cause more intense and persistent cramps.