Poor sleep can make erections less reliable. It lowers testosterone, raises fatigue and stress, and can hide a sleep disorder such as sleep apnea that affects erections directly. Fixing sleep often helps, but it rarely fixes ED on its own, and trouble that keeps happening deserves a proper evaluation.
Why sleep and erections are linked
Erections are part of normal sleep. Healthy men have them during the night, which is why clinicians ask whether morning erections are still happening. Sleep is also when the body regulates hormones and recovers from the day, so chronic shortfalls tend to show up in mood, energy and sex drive before anything else.
The link also runs the other way. Worry about erections can keep you awake, and a bad night makes the next day’s worry louder. That loop is one reason sleep and sexual function problems so often show up together.
What the research shows
The most quoted experiment is small but striking. In a University of Chicago study published in JAMA in 2011, ten healthy young men slept up to ten hours a night for three nights, then under five hours for eight nights. After a week of short sleep their testosterone was 10 to 15 percent lower, and their mood and sense of vigor dropped as the days went on. It was a lab study of young, lean, healthy men. It shows what short sleep does to a hormone, not that it causes ED.
A 2025 systematic review presented to the International Continence Society pooled 42 studies, most of them about sleep apnea. It found that poor sleep quality went along with higher rates of ED, and that ED became more common as apnea got more severe, from roughly a quarter of men with mild apnea to about 60 percent with severe apnea. The authors described the link as two-way and recommended screening for sleep disorders as part of an ED evaluation. This was a conference abstract, so treat it as a strong signal rather than settled science.
Four ways bad sleep gets in the way
- Lower testosterone and lower desire. Less sleep means less drive, which makes arousal slower and erections less likely to build. Our low testosterone vs. ED guide explains why desire and erections are separate systems.
- Fatigue and stress. A tired brain is more anxious, more distractible and quicker to start monitoring itself during sex, which is the engine of performance anxiety.
- Sleep apnea. Repeated breathing pauses strain the cardiovascular system and often travel with obesity, high blood pressure, diabetes and high cholesterol, all of which also affect erections. See sleep apnea and weak morning erections.
- Alcohol, medications and insomnia. A nightcap can help you fall asleep but fragments the night, and heavy drinking is a known ED risk factor. Some prescription medicines affect both sleep and erections, which is worth raising with the prescriber (see medications linked to ED).
What actually helps
None of these is exotic, and none is a cure by itself. Together they give your body a fair chance.
- Keep a steady bedtime and wake time, including weekends.
- Make the bedroom dark, cool and quiet, and put screens away before bed.
- Move caffeine earlier in the day and keep alcohol modest, especially close to bedtime.
- Get daylight and regular activity. Our piece on cardio and ED covers the exercise side.
- If you lie awake most nights, ask about cognitive behavioral therapy for insomnia. The 2025 review lists it, along with CPAP for apnea, as a sensible intervention.
- If apnea is diagnosed, treat it. In the review, CPAP improved erectile function, though evidence on how it compares with ED medication was mixed.
Signs sleep may be the real problem
Mention these to a clinician: loud snoring, gasping or pauses a partner has noticed, waking unrefreshed, falling asleep during the day, morning headaches, and ED that comes with weak or absent morning erections. A sleep study is how apnea is confirmed. Sleep apnea is not something to self-diagnose from an app.
Track before you change anything
Two weeks of simple notes will tell you more than guessing. Each morning, jot down:
- Bedtime, wake time and how rested you feel.
- Caffeine and alcohol the day before, and roughly when.
- Whether you woke with an erection, and how sex went if it happened.
- Stress level and any new medicine or illness.
Patterns tend to jump out. Maybe erections are fine after a regular week and shaky after late nights, which points to sleep and stress. Maybe they are unreliable no matter how well you slept, which suggests another cause is in play and deserves a proper look. Bring the notes to your appointment. They help a clinician far more than “it comes and goes.”
Also be fair to yourself. One poor week does not mean something is permanently wrong. Occasional erection trouble is common, and worrying about whether it will happen again can make it more likely.
Bottom line
Treat sleep as one lever among several. If you are consistently short on sleep, fixing that is cheap, safe and worth doing. If you snore heavily, feel sleepy all day or have other health conditions, get checked, because the cause may be bigger than a bad routine. Persistent ED is also a reason to look at your overall health, not just your bedroom habits.
Frequently asked questions
Can one bad night of sleep cause erection problems?
A single rough night can leave you tired, stressed and less interested in sex, which can make an erection less reliable that day. Occasional erection trouble is common and is not usually a sign of a lasting problem.
How many hours of sleep do I need for better erections?
Research does not set an erection-specific target. The goal is sleep that is long enough and regular enough that you wake rested. A clinician can help if you cannot get there.
Does sleep apnea cause ED?
Sleep apnea is associated with ED, and a 2025 review abstract found the link grew stronger as apnea became more severe. Treating apnea may improve erectile function in some men, but results vary.
Will fixing my sleep cure my ED?
Sometimes it improves it, especially when poor sleep is a main driver. ED often has several causes at once, so better sleep is best treated as one part of a wider plan.
Should I ask for a sleep study?
If you snore loudly, gasp at night or feel very sleepy during the day, ask a clinician. A sleep study is how sleep apnea is diagnosed.
Sources & evidence
Sleep and hormone findings come from the sources below. They are summaries of research, not personal medical advice.
- University of Chicago Medicine: sleep loss lowers testosterone in healthy young men (JAMA, 2011)
- International Continence Society 2025: sleep and male sexual dysfunction, systematic review abstract
- Mayo Clinic: erectile dysfunction symptoms and causes