Experts tell Bustle that the part of the menstrual cycle that occurs just before a woman has a period tends to cause havoc on her sleep patterns.

“The end of the luteal phase following ovulation is often the worst time for sleeping during the menstrual cycle,” Rachel Stone, a registered nurse and director of triage at birth control organization Pill Club, tells Bustle.

The reason for this is twofold. One is that PMS, or pre-menstrual syndrome, can have symptoms that affect sleep negatively. PMS occurs between seven and 14 days before periods begin, and for people who experience it, symptoms can include everything from headaches to body pain and breast tenderness. “Anyone who has experienced bloating, cramping, headaches, or mood changes knows that they don’t equal a good night’s rest,” says Stone.

However, the second aspect of the luteal phase that can damage sleep quality isn’t about symptoms. It concerns the hormones of the menstrual cycle itself. Over the course of a cycle, hormone levels in the body rise and fall — and during ovulation, progesterone levels peak, as the body prepares for possible pregnancy. If an egg isn’t fertilized, progesterone levels start to fall, bringing on menstruation. Sleep quality can suffer as a result.