This July, we’re heating things up with Sex-Rated: The VICE Guide to Sex in India. Come with us as we dive deep into Indian sexuality, as well as cherry-pick some of the best videos and stories about sex from VICE around the world. Read more here.

This article originally appeared on VICE US.

One in three American adults do not get enough sleep. Sexual issues are also common, with as many as 45 percent of women and 31 percent of men having a concern about their sex life. While these might seem like distinct concerns, they are actually highly related.

How are sleep and sex related? We most commonly sleep and have sex in the same location—the bedroom. Less obvious but more important is that lack of sleep and lack of sex share some common underlying causes, including stress. Especially important, lack of sleep can lead to sexual problems and a lack of sex can lead to sleep problems. Conversely, a good night’s sleep can lead to a greater interest in sex, and orgasmic sex can result in a better night’s sleep.

I'm a sex educator and researcher who has published several studies on the effectiveness of self-help books in enhancing sexual functioning. I have also written two sexual self-help books, both based in research findings. My latest book, Becoming Cliterate, is aimed at empowering women to reach orgasm. More pertinent to the connection between sleep and sex, my first book, A Tired Woman’s Guide to Passionate Sex, was written to help the countless women who say they are too exhausted to be interested in sex.

The reason I wrote a book for women who are too tired for sex is because women are disproportionately affected by both sleep problems and by low sexual desire, and the relationship between the two is indisputable. Women are more likely than men to have sleep problems, and the most common sexual complaint that women bring to sex therapists and physicians is low desire. Strikingly, being too tired for sex is the top reason that women give for their loss of desire.

Conversely, getting a good night’s sleep can increase desire. A recent study found that the longer women slept, the more interested in sex they were the next day. Just one extra hour of sleep led to a 14 percent increase in the chances of having a sexual encounter the following day. Also, in this same study, more sleep was related to better genital arousal.

While this study was conducted with college women, those in other life stages have even more interrelated sleep and sex problems. Menopause involves a complicated interaction of biological and psychological issues that are associated with both sleep and sex problems. Importantly, a recent study found that among menopausal women, sleep problems were directly linked to sexual problems. In fact, sleep issues were the only menopausal symptom for which such a direct link was found.

Interrelated sleep and sexual issues are also prevalent among mothers. Mothers of new babies are the least likely to get a good night’s sleep, mostly because they are caring for their baby during the night. However, ongoing sleep and sexual issues for mothers are often caused by having too much to do and the associated stress. Women who are married with school-age children and working full-time are the most likely to report insomnia. Still, part-time working moms and moms who don’t work outside the home report problems with sleep as well.

While fathers also struggle with stress, there is evidence that stress and the resulting sleepless nights dampen women’s sexual desire more than they do men’s. Some of this is due to hormones. Both insufficient sleep and stress result in the release of cortisol, and cortisol decreases testosterone. Testosterone plays a major role in the sex drive of women and men. Men have significantly more testosterone than women. So, thinking of testosterone as a tank of gas, the cortisol released by stress and lack of sleep might take a woman’s tank to empty, yet only decrease a man’s tank to half full.

Although lack of sleep and stress seems to affect women’s sexual functioning more than men’s, men still suffer from interrelated problems in these areas. One study found that, among young healthy men, a lack of sleep resulted in decreased levels of testosterone, the hormone responsible for much of our sex drive. Another study found that, among men, sleep apnea contributed to erectile dysfunction and an overall decrease in sexual functioning. Clearly, among men, lack of sleep results in diminished sexual functioning. I could not locate a study to prove this, as it stands to reason that the reverse is also true. That is, it seems logical that, as was found in the previously mentioned study among women, for men a better night’s sleep would also result in better sexual functioning.

While sleep (and stress) have an effect on sex, the reverse is also true. That is, sex affects sleep (and stress). According to sex expert Ian Kerner, too little sex can cause sleeplessness and irritability. Conversely, there is some evidence that the stress hormone cortisol decreases after orgasm. There’s also evidence that oxytocin, the “love hormone” that is released after orgasm, results not only in increased feelings of connection with a partner, but in better sleep.

Additionally, experts claim that sex might have gender-specific effects on sleep. Among women, orgasm increases estrogen, which leads to deeper sleep. Among men, the hormone prolactin that is secreted after orgasm results in sleepiness.

It is now clear that a hidden cause of sex problems is sleeplessness and that a hidden cause of sleeplessness is sex problems. This knowledge can lead to obvious, yet often overlooked, cures for both problems. Indeed, experts have suggested that sleep hygiene can help alleviate sexual problems and that sex can help those suffering from sleep problems.

Perhaps, then, it is no surprise that both sleep hygiene suggestions and suggestions for enhanced sexual functioning have some overlap. For example, experts suggest sticking to a schedule, both for sleep and for sexual encounters. They also recommend decreasing smartphone usage, both before bed and when spending time with a partner. The bottom line of these suggestions is to make one’s bedroom an exclusive haven for the joys of both sleep and sex.