A recent study followed nearly 4,000 men and women in their early- to mid-60s for a year and found that poor sleep was associated with erectile dysfunction for men, and arousal problems and orgasmic difficulty for women, reports CNN.

Here’s how those are connected: It turns out that your highest levels of that important hormone occur during REM sleep, which is the deep, healing sleep that occurs late in the sleep cycle. Your first REM will last about 10 minutes, but as the night goes on REM stages grow longer, with the final one lasting up to an hour. So, if you don’t sleep long enough to enter REM sleep, you don’t get those restorative levels of circulating testosterone.

Get the full story at cnn.com