Menstrual cramps happen when a chemical called prostaglandin makes your uterus contract (tighten up). During menstruation, prostaglandin levels are higher, which means your uterus contracts more strongly. This is the cramping and discomfort you feel. These contractions help shed your uterine lining, which is the blood and tissue that comes out of your vagina during your period. Prostaglandin levels rise right before menstruation begins. Levels decrease once you get your period, which is why cramping tends to ease up after a few days.
What you’re feeling is a tightening and relaxing of your uterus. The muscles in your uterus contract in order to shed your uterine lining. Experts aren’t entirely sure why some people have more painful periods, but they think it may be because they have higher levels of prostaglandins. There also may not be a clear explanation other than everyone’s body is different.