The primary cause of menstrual discomfort is the release of prostaglandins, which are chemicals in the body that cause the uterine muscles to contract. High levels of prostaglandins can lead to more intense contractions and greater pain. Other factors such as endometriosis, fibroids, and pelvic inflammatory disease can also contribute to menstrual pain.