The link between sleep and erectile dysfunction is stronger than most people realise. Much of your testosterone is produced while you sleep, poor sleep raises the stress hormones that work against arousal, and one specific disorder, obstructive sleep apnoea, is closely linked to erectile difficulties. If your sleep is poor, treating it can help your sex life as well as almost everything else.
The testosterone rhythm
Testosterone follows a daily rhythm, rising through the night and peaking in the early morning, and a large share of its production depends on getting enough good-quality sleep, particularly the deeper stages. A well-known study found that cutting healthy young men's sleep to five hours a night lowered their daytime testosterone by 10 to 15 per cent within a week. Over time, chronically poor sleep can keep levels lower than they should be, which can dampen desire and, less directly, erectile function.
The relationship between testosterone, desire and erections is easy to muddle, so we untangle it in testosterone and libido. The short version is that low testosterone affects desire more than the mechanics of an erection, but the two are connected, and sleep influences both.
The sleep apnoea link
Obstructive sleep apnoea, where the airway repeatedly collapses during sleep and breathing stops for short periods, is strongly associated with erectile dysfunction. The connection runs several ways: the sleep itself is fragmented, blood oxygen dips repeatedly through the night, and apnoea damages blood vessels over time in much the same way other cardiovascular risk factors do. Men with sleep apnoea are more likely to have erectile difficulties than men without it, and the two share risk factors such as being overweight.
Because apnoea damages blood vessels, it belongs to the same cardiovascular picture as much of erectile dysfunction. Our guide to ED and heart health explains why erectile difficulties can be an early warning sign of wider vascular problems, and why they are worth taking seriously rather than treating in isolation.
Shift work and short sleep
Working nights or rotating shifts disrupts the body clock that governs the testosterone rhythm and much else. Men doing sustained shift work, or simply running on too little sleep, can experience lower desire and more erectile difficulty, alongside the mood and energy effects of being tired. It is not always easy to change shift patterns, but protecting sleep where you can, with a dark, quiet room, consistent sleep timing on days off, and limiting caffeine late in a shift, is worth the effort.
How does poor sleep cause erectile dysfunction?
Poor sleep and low mood feed each other, and both work against arousal. As the NHS notes, regular poor sleep raises the risk of a range of health problems, and sexual function is part of that picture. Sleep deprivation raises cortisol, the main stress hormone, which pulls in the opposite direction to relaxed sexual arousal. Tiredness also simply reduces interest in sex. So the effect of poor sleep on erectile function is partly hormonal, partly vascular and partly psychological, the same theme that runs through most of erectile health.
What morning erections can tell you
Healthy men normally have several erections during sleep, usually during the dreaming stages, which is why waking with an erection is common. These are driven by the nervous system rather than by arousal, and they are one reason sleep and erectile health are so closely tied. If you still get firm erections on waking or during sleep but struggle during sex, that pattern often points towards a psychological or anxiety-related cause rather than a purely physical one, because the physical machinery is clearly working overnight. A complete loss of night-time and morning erections is more suggestive of a physical factor and is worth mentioning to a clinician. It is only a rough guide, not a diagnosis, but it is a useful observation to bring to an appointment.
The chicken-and-egg problem
Sleep and erectile function can pull each other down in a loop. Worry about erections can disturb sleep; disturbed sleep lowers testosterone and mood; and that makes erectile difficulties more likely, which feeds the worry. Anxiety and low mood are themselves among the commonest reasons people sleep badly, so the same psychological state can be driving both problems at once. Untangling which came first is less important than recognising that improving either tends to help the other, which is why clinicians often look at sleep, mood and sexual function together rather than in isolation.
What to do
Treat sleep as part of the picture, not an afterthought. Aim for regular sleep timing and the seven to nine hours most adults need; get heavy snoring or suspected apnoea assessed by your GP; and be honest about how shift work or stress may be eating into your rest. Good sleep habits, sometimes called sleep hygiene, make a measurable difference for many people, and it is worth combining them with the other lifestyle levers. Improving sleep rarely fixes erectile dysfunction on its own, but it removes an obstacle, supports testosterone, and helps the treatments and other changes work better.
Sleep sits alongside the other lifestyle levers, such as activity, alcohol and smoking, that shape erectile function, covered across our erectile dysfunction causes overview, and regular exercise, discussed in exercise and erectile function, tends to improve sleep and erectile health together. If difficulties persist despite better sleep, it is worth speaking to a clinician about the wider causes and options.



