Key takeaways
Lack of sleep can contribute to erectile dysfunction (ED) by lowering testosterone, disrupting blood flow, reducing libido, and increasing stress.
Sleep apnea is also linked to ED, potentially due to low oxygen, blood vessel problems, hormonal changes, and disrupted sleep.
Addressing sleep deprivation and ED with medication, therapy, and lifestyle changes can improve your sleep quality and your sex life.
Here's what we'll cover
Here's what we'll cover
Here's what we'll cover
Key takeaways
Lack of sleep can contribute to erectile dysfunction (ED) by lowering testosterone, disrupting blood flow, reducing libido, and increasing stress.
Sleep apnea is also linked to ED, potentially due to low oxygen, blood vessel problems, hormonal changes, and disrupted sleep.
Addressing sleep deprivation and ED with medication, therapy, and lifestyle changes can improve your sleep quality and your sex life.
You know that poor sleep can make you feel groggy and irritable the next day, but can lack of sleep make it difficult to get an erection? It might. Lack of sleep may contribute to erectile dysfunction (ED) by impacting your testosterone levels, disrupting blood flow, and increasing stress. Find out how it happens and what you can do to improve sleep quality.
Can lack of sleep cause erectile dysfunction?
Yes, lack of sleep may contribute to erectile dysfunction.
A study of over 500,000 men found that those with insomnia that was not medically treated were 58% more likely to be diagnosed with ED during the study period than men without insomnia.
Another genetic study showed that people with a genetic predisposition to insomnia had an increased risk of ED. Researchers weren’t sure why, but proposed it may have something to do with how poor sleep affects hormone levels, the body’s internal clock, and nitric oxide signaling, all of which may affect erectile function.
How lack of sleep can affect erections and sex life
Lack of sleep can affect erections by impacting your hormones, blood flow, libido, and stress levels.
Low testosterone
Cutting sleep short lowers testosterone, and that drop can carry over into the bedroom. Research suggests that restricting participants' sleep caused testosterone levels to drop, especially when the second half of the night (when testosterone typically peaks during REM sleep) was cut short.
That matters because testosterone helps drive the nerve and blood vessel signaling behind an erection. Low testosterone is commonly associated with erectile dysfunction, so a few bad nights can work against you twice over: less sleep, lower testosterone, and a harder time getting or keeping an erection.
Reduced blood flow
Erections are all about blood flow. When you are sexually aroused, your brain sends signals to the blood vessels in the penis, causing them to relax and widen so blood can rush in and fill the erectile tissue.
Sleep deprivation can impact how well the inner lining of the blood vessels works (endothelial function). Research suggests sleep loss increases inflammation and oxidative stress, which reduces nitric oxide, a molecule that helps blood vessels relax and widen.
Both inflammation and lower testosterone may help explain the connection between poor sleep and ED, though one study found inflammation appears to play the larger role.
Increased stress levels
Ever feel stressed after a night of bad sleep? You’re not alone.
Short or disrupted sleep can alter levels of cortisol, the primary stress hormone, keeping the body in a "fight-or-flight" state. This can make it harder for the blood vessels in the penis to relax, which needs to happen to get an erection. This could contribute to temporary ED in some people.
Poorer sleep quality is associated with more severe ED, as well as higher levels of stress, anxiety, and depression, per a study of 249 men with ED.
Low libido
Poor sleep can dampen interest in sex, and there's a mechanism behind it: the same testosterone drop and stress hormone shifts covered above also blunt libido, and fatigue and low mood (both common after a run of bad nights) compound the effect. In one study of nearly 2,000 men undergoing fertility testing, those with sleep disturbances were more likely to report low libido, and more likely to pursue treatment for ED as a result.
Can sleep apnea cause ED?
Yes, sleep apnea is a known risk factor for ED. In a comprehensive review of 28 studies, patients with obstructive sleep apnea, a condition that causes breathing to repeatedly stop and start during sleep, were significantly more likely to also be diagnosed with ED. Greater severity of sleep apnea is also associated with worsening ED symptoms in other research.
There are a few potential explanations on how sleep apnea contributes to ED, including:
Low oxygen: The leading explanation is that repeated drops in oxygen during sleep caused by sleep apnea can damage blood vessels and reduce nitric oxide, making it harder for blood vessels in the penis to relax and fill with blood.
Higher sympathetic activity: Sleep apnea can increase sympathetic nervous system activity and norepinephrine levels, which prevent the relaxation of blood vessels needed for an erection.
Lower testosterone levels: Men with sleep apnea often have lower testosterone, which may contribute to ED and low libido.
Disrupted REM sleep: Sleep apnea can reduce the amount of REM sleep a person gets, when most nighttime erections occur. Fewer nighttime erections could contribute to erectile problems when awake.
Depression: Sleep apnea is linked to depression, which can reduce sexual desire and interfere with the nervous system functioning involved in erections.
If you develop sudden ED, especially without an obvious explanation, it is worth talking to a healthcare provider to rule out an underlying health condition such as sleep apnea.
What to do about lack of sleep and erectile dysfunction
If a lack of sleep is impacting your erections, there are ways to improve both:
Address lack of sleep
Rule out sleep apnea: Some common symptoms of sleep apnea include loud snoring, waking up choking, pauses in breathing, and insomnia. But the best way to tell if you have the condition is to talk to your healthcare provider. They may recommend doing a sleep study and suggest treatments ranging from lifestyle changes to CPAP (continuous positive airway pressure) machines.
Practice good sleep hygiene: Implementing healthy sleep habits could improve your sleep quality and how you feel when you wake up. They include keeping a consistent sleep schedule (even on weekends), avoiding intense exercise and screens before bed, and keeping your bedroom quiet, cool, and dark at night.
Talk to a therapist: Research suggests cognitive behavioral therapy (CBT) is an effective alternative to sleep medication for chronic insomnia. A CBT-trained therapist can teach you skills to reduce the physical and mental arousal that keeps you awake and develop habits that support your body’s natural sleep-wake cycle.
Address erectile dysfunction
Consider medication: First-line ED treatments like Viagra (sildenafil) and Cialis (tadalafil) increase blood flow to the penis, making it easier to get and keep erections. Other options include tadalafil-containing Daily Rise Gummies and Ro Sparks, which dissolve in the mouth and contain sildenafil and tadalafil.
Make healthy lifestyle changes: Many of the same habits that improve sleep — regular exercise, a balanced diet, and cutting back on smoking — also support erectile function directly. One review found that lifestyle changes can improve blood vessel function, reduce inflammation, and increase nitric oxide availability, all of which support healthy erectile function.
Consider therapy: Stress and anxiety can contribute to psychological ED. Research suggests therapies such as CBT and sex therapy can improve erectile function, especially when combined with ED medication.
Bottom line
A lack of sleep can have an impact on your sex life, but it can also work the other way, too. Sexual dysfunction can cause stress, anxiety, and depression, potentially contributing to poor sleep. Fortunately, there is a way out of the cycle:
The relationship runs both ways. Poor sleep can make ED more likely, and ED-related stress can make sleep worse — which is why treating one often helps the other.
Sleep apnea is a notable piece of this. Repeated drops in oxygen, disrupted REM sleep, and related mental health effects can all raise the risk of ED.
Small changes add up. Consistent sleep habits, treatment for sleep apnea if present, and stress management can improve both sleep and erectile function over time.
ED treatment doesn't have to wait on better sleep. Medication, therapy, and lifestyle changes to address sleep hygiene can help with ED directly while sleep is being addressed.
Frequently asked questions (FAQs)
Does sex help you sleep?
Yes. Some research suggests that sex with orgasm is linked to better sleep, but sex without orgasm may have no effect.
Can lack of sleep make it hard to get hard?
Yes. Research suggests a lack of sleep can make it harder to get or keep an erection. Potential reasons for the link between poor sleep and ED include changes in hormone levels, blood flow, nitric oxide signaling, and stress.
Does being tired affect a man sexually?
Yes. Beyond raising the risk of ED itself, poor sleep can lower sex drive and make it harder to get aroused in the first place. One study of nearly 2,000 men found that those with sleep disturbances were more likely to report low libido and other sexual problems, including ED.
Can lack of sex cause insomnia?
Not necessarily. While some research suggests sex with orgasm is linked to better sleep, there is not enough evidence that not having sex directly contributes to insomnia. Insomnia can have many causes and risk factors, including stress, genetics, work schedule, and poor sleep habits.
DISCLAIMER
If you have any medical questions or concerns, please talk to your healthcare provider. The articles on Health Guide are underpinned by peer-reviewed research and information drawn from medical societies and governmental agencies. However, they are not a substitute for professional medical advice, diagnosis, or treatment.
Viagra Important Safety Information: Read more about serious warnings and safety info.
Cialis Important Safety Information: Read more about serious warnings and safety info.
References
Atallah, S., Haydar, A., Jabbour, T., et al. (2021). The effectiveness of psychological interventions alone, or in combination with phosphodiesterase-5 inhibitors, for the treatment of erectile dysfunction: A systematic review. Arab Journal of Urology, 19(3), 310–322. doi: 10.1080/2090598X.2021.1926763. Retrieved from https://pmc.ncbi.nlm.nih.gov/articles/PMC8451609/
Belladelli, F., Li, S., Zhang, C. A., et al. (2024). The Association Between Insomnia, Insomnia Medications, and Erectile Dysfunction. European Urology Focus, 10(1), 139–145. doi: 10.1016/j.euf.2023.08.005. Retrieved from https://pubmed.ncbi.nlm.nih.gov/37690918/
Dhaliwal, A. & Gupta, M. (2023). PDE5 Inhibitors. StatPearls. Retrieved from https://www.ncbi.nlm.nih.gov/books/NBK549843/
Gu, Y., Wu, C., Qin, F., et al. (2022). Erectile Dysfunction and Obstructive Sleep Apnea: A Review. Frontiers in Psychiatry, 13, 766639. doi: 10.3389/fpsyt.2022.766639. Retrieved from https://pmc.ncbi.nlm.nih.gov/articles/PMC9178074/
Holmer, B. J., Lapierre, S. S., Jake-Schoffman, D. E., et al. (2021). Effects of sleep deprivation on endothelial function in adult humans: a systematic review. GeroScience, 43(1), 137–158. doi: 10.1007/s11357-020-00312-y. Retrieved from https://pmc.ncbi.nlm.nih.gov/articles/PMC8050211
Kellesarian, S. V., Malignaggi, V. R., Feng, C., et al. (2018). Association between obstructive sleep apnea and erectile dysfunction: A systematic review and meta-analysis. International Journal of Impotence Research, 30(3), 129–140. doi: 10.1038/s41443-018-0017-7. Retrieved from https://www.nature.com/articles/s41443-018-0017-7
Liu, P. Y. (2019). A Clinical Perspective of Sleep and Andrological Health: Assessment, Treatment Considerations, and Future Research. The Journal of Clinical Endocrinology and Metabolism, 104(10), 4398–4417. doi: 10.1210/jc.2019-00683. Retrieved from https://academic.oup.com/jcem/article/104/10/4398/5481939
Maiorino, M. I., Bellastella, G., & Esposito, K. (2015). Lifestyle modifications and erectile dysfunction: what can be expected?. Asian Journal of Andrology, 17(1), 5–10. doi: 10.4103/1008-682X.137687. Retrieved from https://pmc.ncbi.nlm.nih.gov/articles/PMC4291878/
National Heart, Lung, and Blood Institute-a. (2022). Insomnia: Causes and Risk Factors. Retrieved from https://www.nhlbi.nih.gov/health/insomnia/causes
National Heart, Lung, and Blood Institute. (2025). Sleep Apnea: Treatment. Retrieved from https://www.nhlbi.nih.gov/health/sleep-apnea/treatment
National Heart, Lung, and Blood Institute-b. (2022). Sleep Deprivation and Deficiency: Healthy Sleep Habits. Retrieved from https://www.nhlbi.nih.gov/health/sleep-deprivation/healthy-sleep-habits
Nebioğlu, A., Başaranoğlu, M., & Çayan, S. (2026). Impact of sleep quality and chronotype on self-reported erectile function in young adults presenting with erectile complaints: a prospective observational study. International Journal of Impotence Research, 38(1), 44–50. doi: 10.1038/s41443-025-01089-4. Retrieved from https://www.nature.com/articles/s41443-025-01089-4
Oesterling, C. F., Borg, C., Juhola, E., & Lancel, M. (2023). The influence of sexual activity on sleep: A diary study. Journal of Sleep Research, 32(4), e13814. doi: 10.1111/jsr.13814. Retrieved from https://onlinelibrary.wiley.com/doi/pdfdirect/10.1111/jsr.13814
Pang, K. H., Tong, K. S., Muneer, A., & Alnajjar, H. M. (2026). The association between obstructive sleep apnoea and erectile dysfunction: A systematic review and meta-analysis. International Journal of Impotence Research. doi: 10.1038/s41443-026-01315-7. Retrieved from https://www.nature.com/articles/s41443-026-01315-7
Rossman, J. (2019). Cognitive-Behavioral Therapy for Insomnia: An Effective and Underutilized Treatment for Insomnia. American Journal of Lifestyle Medicine, 13(6), 544–547. doi: 10.1177/1559827619867677. Retrieved from https://pmc.ncbi.nlm.nih.gov/articles/PMC6796223
Seyer, A., Nolte, D., Kenfield, S., et al. (2024). (057) Is poor sleep associated with poor sex? An analysis of sexual dysfunction in men with sleep disorders undergoing fertility testing. The Journal of Sexual Medicine, 21(Supplement_7), qdae167.055. doi: 10.1093/jsxmed/qdae167.055. Retrieved from https://academic.oup.com/jsm/article/21/Supplement_7/qdae167.055/7918876?login=false
Tsujimura, A. (2013). The relationship between testosterone deficiency and men's health. World Journal of Men's Health, 31(2), 126–135. doi: 10.5534/wjmh.2013.31.2.126. Retrieved from https://pmc.ncbi.nlm.nih.gov/articles/PMC3770847/
Wu, X., Gao, H., Liu, G., et al. (2026). Unraveling the Pathways Linking Sleep Disturbance and Vasculogenic Erectile Dysfunction: The Dominant Role of Inflammation and Testosterone Mediation. Andrology, 14(6), 1590–1599. doi: 10.1111/andr.70202. Retrieved from https://pubmed.ncbi.nlm.nih.gov/41757851/
Xiong, Y., Zhang, F. X., Zhang, Y. C., et al. (2023). Genetically predicted insomnia causally increases the risk of erectile dysfunction. Asian Journal of Andrology, 25(3), 421–425. doi: 10.4103/aja202261. Retrieved from https://pmc.ncbi.nlm.nih.gov/articles/PMC10226508/pdf/AJA-25-421.pdf
Zhang, F., Xiong, Y., Qin, F., et al. (2022). Short sleep duration and erectile dysfunction: A review of the literature. Nature and Science of Sleep, 14, 1945–1961. doi: 10.2147/NSS.S375571. Retrieved from https://pmc.ncbi.nlm.nih.gov/articles/PMC9621223/













