Menstrual cramps are caused by contractions in the uterus. These contractions are triggered by the release of prostaglandins, which are hormone-like substances involved in pain and inflammation. Higher levels of prostaglandins are associated with more severe menstrual cramps.