Hormones that influence your libido also regulate your shut-eye, science shows. Luckily, you can put some tips into action to get your sex and sleep back to their prime.

Couple in bed
Credit: Beatriz Vera/EyeEm/Getty

The better your snooze, the hotter your lust life. It's that simple, science shows.

It's logical that you're more likely to be in the mood when you're not exhausted and cranky (add that to the list of things that could be killing your libido), but not everyone is equally affected. Women have a 40 percent higher risk of insomnia than men do, research shows, and that sleep gap affects your libido, since you’re less likely to be in the mood if you’re tired.

In fact, a study published in the Journal of Sexual Medicine found that when women got less sleep, they reported lower levels of sexual desire and were less likely to have sex. The women who regularly got more shut-eye reported better arousal. One reason: When women sleep less and are more tired, they’re less likely to

feel positive emotions like happiness that are strongly related to desire, says study author David Kalmbach, Ph.D., a researcher at the Henry Ford Health System in Detroit. But your sex hormones also play a huge role.

The Link Between Sex Hormones and Sleep

Your sex hormones play a role in how tired you feel: “Evidence suggests that estrogens help us maintain normal sleep patterns by binding to receptors in the brain that govern sleep,” says Jessica Mong, Ph.D., a pharmacology professor at the University of Maryland School of Medicine. And when progesterone is higher, you may feel sleepier.

Fluctuations in estrogens and progesterone are linked to sleep quality. Big hormonal shifts during a woman’s lifetime, like puberty, pregnancy, and menopause, cause the worst sleep disruption, says Mong. But it can also happen throughout your monthly cycle, as levels of these hormones rise and fall. Right before your period and as it begins, levels of both are lower, and you may find it harder to fall asleep. In fact, 30 percent of women have trouble sleeping during their periods, according to the National Sleep Foundation. After ovulation, estrogens and progesterone rise, and this is the time of the month you’re likely to feel sleepier, says Katherine Hatcher, Ph.D., a postdoctoral researcher at Albany Medical College in New York.

On the flip side, quality rest actually boosts the action of certain sex hormones, like androgens and estrogen, that lead to arousal. That may help explain why researchers at the University of Michigan Medical School found that getting enough sleep can cause you to crave sex more and may even make it extra-good sex. There's no magic number of hours of rest to aim for, says Kalmbach (the study's author), but you know you need more if you're feeling groggy on most days.

So how do you score more sleep so you can have better sex and score sex to improve your zzz's? Besides logging enough hours, try these tips for boosting both types of bed action:

1. Take a Chill Pill

While you can’t control the natural fluctuations of your hormones, there are ways to minimize their negative impact on your slumber and improve your sex life, starting with finding ways to reduce stress. Stress can lower your libido, and high levels of the stress hormone cortisol suppress estrogen and progesterone, which may worsen sleep issues, says Hatcher. Practices like meditation can help you relax and get more shut-eye, adds Mong.

2. Break a Sweat

Studies show that regular exercise helps you snooze sounder, says Mong. This is especially important at the beginning and end of your cycle when estrogen is unable to maintain sleep properly, she says. (See: The Important Sleep-Exercise Connection)

3. Stay in Tune with Your Body

Track your cycle (try a period-tracking app), sleep issues, and anything keeping you awake, like PMS or anxiety. That can help your gynecologist tailor sleep interventions for you, like taking melatonin (a naturally-occurring hormone that makes you drowsy and is also available in supplement form) or doing breath work before bed, says Hatcher.

4. Master Morning Sex

Late at night (11 p.m.) is the most common time couples get busy — and it's not ideal. "Your levels of melatonin are high then, and your levels of energy-producing hormones like testosterone are low," says Michael Breus, Ph.D., a sleep doctor in Manhattan Beach, California. "That's the exact opposite of what you need for steamy sex." The solution? Have sex first thing, when melatonin is low and testosterone is high-the perfect combo for fireworks. (Related: I Tried a 30-Day Sex Challenge to Revive My Marriage's Boring Sex Life)

5. Become a Makeup Sex Pro

People who are happier with their sex lives report fewer sleep disturbances than others, according to a study in the journal Health. The reason: Any sort of intimacy, including sex, reduces stress, which means you can sleep easier, report the study's authors. Conflict is especially detrimental to sleep, so if you can, have makeup sex after a fight. Even if it takes a few minutes to cool down first, it's so worth the effort: It can be extra passionate, and you'll wake up feeling more refreshed. (One study found that sleep-deprived arguments are total dead ends — and actually hurt your health. So press pause on the tough talk, get busy, and snooze instead.)