ED and Lifestyle: What Exercise, Sleep, Diet, and Stress Actually Do

If you’ve noticed changes to your erections as you move into your forties and beyond, it’s unlikely that you’re simply imagining it. This is a time when men start thinking about connections between erectile health and lifestyle factors, like how well you’ve been sleeping, how much you’ve been drinking, and whether you’re exercising as much as you’d like to admit. 

You may not have seen a doctor yet, instead running your own internal experiments, wondering how much of this is “just getting older,” and how much is down to other factors.

This article treats that question seriously. Exercise, sleep, diet, and stress are not wellness-influencer talking points; they’re real, physiological levers with well-understood mechanisms that can all result in some level of erectile dysfunction (ED) , including: blood vessel health, nerve signaling, hormone levels, and the nervous system’s ability to shift out of “alert” mode for long enough for an erection to happen. That said, lifestyle change does have real limits, so we’re honest about that upfront, before asking you to change many habits all at once.

Can Lifestyle Changes Actually Reverse Erectile Dysfunction?

Lifestyle changes can meaningfully improve or even reverse erectile dysfunction that’s driven by vascular and hormonal contributors, such as reduced blood flow, elevated blood sugar, excess weight, and poor sleep. This is because those are the same mechanisms exercise, diet, and sleep improvement directly target. They generally cannot reverse ED caused by established structural damage (scar tissue in the erectile tissue itself) or nerve injury (from surgery or spinal cord trauma), because those pathways are about physical injury that lifestyle change does not repair. 

That distinction is important because it changes what you’re actually testing. If your ED has a vascular or hormonal component, which is common in men in their late 30s to 50s who are carrying extra weight, sleeping poorly, or drinking more than they used to, then real lifestyle habit change has a real chance of helping. That said, if nothing changes despite months of consistent effort, that should be considered useful information rather than proof that you’ve failed. This is because it would suggest a ceiling on what lifestyle changes can do has been reached, and at this point, it’s a good idea to involve a doctor rather than simply tell yourself to work harder at the same four things.

The four factors this article will cover, and the mechanisms each one most significantly affects are:

  • Exercise: Affecting vascular health (blood flow, blood vessel function) and, to a lesser degree, hormonal health
  • Sleep: Impacting both vascular and hormonal health, especially where undiagnosed sleep apnea is involved
  • Diet: Affecting vascular and metabolic health, largely through weight and blood sugar control
  • Stress: Impacting neurological health, through the nervous system’s control over erections 

It’s worth noting that this article is targeted primarily at men over the age of 40. ED under the age of 40 can sometimes be driven by different factors, and is worth exploring more specifically if you fall into that age group. It’s also important to remember that ED can be seen as a hallmark of one’s health. Improving these factors will not only help your ED, but also your overall well-being.

How Does Exercise Improve Erectile Function?

Aerobic exercise improves erectile function primarily by improving endothelial function, the health of the thin layer of cells lining blood vessels, which increases the availability of nitric oxide, the molecule directly responsible for the vessel relaxation that allows an erection to happen. Men who exercise regularly show more improvement than sedentary men, and higher-intensity aerobic activity appears to produce a stronger effect than light activity alone.

This mechanism explains why exercise often helps, even before any diagnosed vascular issue. Put simply, every erection depends on the endothelium releasing nitric oxide when needed, and that capacity reduces with age, inactivity, smoking, and carrying excess weight, well before these factors add up to a condition like atherosclerosis. Aerobic exercise reverses part of the degradation, essentially keeping your internal plumbing more flexible.

You’ll often also see pelvic floor exercises talked about in relation to ED too. These work through a slightly different mechanism again, strengthening the muscles (known medically as the “bulbocavernosus” and “ischiocavernosus”) that trap blood in the penis during an erection. That said, blood getting to the area in the first place is a different problem, and as such, these types of exercises are likely to be more helpful in maintaining an erection rather than achieving one in the first place. All that considered, since minimal effort and no equipment is required, there’s essentially no downside to trying.

What This Looks Like in Practice

The exercise programs that studies show make a measurable effect on erectile function are specific, and it’s worth understanding the dose needed, since that’s the one that’s actually been tested. 

Across the intervention studies, the effective prescription clustered around about 40 minutes of moderate‑to‑vigorous aerobic exercise, four times per week (around 160 minutes weekly), sustained for roughly six months. Nothing in that is exotic. What matters is that it is aerobic, that the intensity is real, and that the timeline is measured in months rather than weeks. 

  • Aerobic work first: brisk walking, cycling, swimming, or rowing; anything sustained and continuous.
  • Moderate-to-vigorous intensity, meaning holding a full conversation becomes difficult.
  • Around 40 minutes per session, four sessions a week.
  • Plan on a six-month horizon; endothelial adaptation is slow and does not show up quickly.
  • Add resistance training for body composition and hormonal support, not as a replacement for the aerobic work.
  • Treat pelvic floor training as a separate tool, aimed at a different problem than blood delivery.

If the pattern you’ve recognized is around losing rigidity during intimacy rather than struggling to get there at all, pelvic floor training is the more targeted intervention, because that suggests a blood-trapping problem rather than a blood-supply one.

It’s worth being honest about what exercise cannot do too. Aerobic fitness improves the endothelium's capacity to deliver blood on demand. That said, it cannot rebuild a nerve pathway that has been cut, and it cannot reverse established fibrosis in the tissue of the penis. If your ED began abruptly after surgery, radiation, or injury, this is still worth doing for your cardiovascular health, and can benefit your mental well-being post surgery, but it is not addressing the mechanism that is actually at fault. 

What's the Real Connection Between Sleep and ED?

Sleep affects erectile function through two largely separate pathways: general sleep debt, which affects testosterone production and next-day vascular function, and obstructive sleep apnea (OSA), a distinct diagnosable condition in which repeated pauses in breathing cause nocturnal hypoxia (the medical term for oxygen deprivation) that directly damages the endothelium over time. OSA is associated with substantially higher rates of ED than in the general population; across studies, roughly 40–70% of men with moderate‑to‑severe OSA experience some degree of erectile dysfunction, and the mechanism is largely vascular and hypoxia‑driven (endothelial and nerve damage), not merely about feeling tired.

Those two different categories matter for different reasons. General sleep debt is the first one to look at, and it’s defined by getting consistently under six hours of sleep, or sleep being fragmented by stress or alcohol. The result of this debt is measurably lower testosterone within days, but it is something that exercise, diet, and stress management can all indirectly improve.

OSA is different, though. It often goes undiagnosed well into midlife; one bariatric cohort in their 40s had about 70% OSA prevalence, but only 13% had a prior diagnosis, and because it is driven by airway collapse rather than just poor sleep habits, it usually does not resolve with sleep hygiene alone. Treating OSA, most commonly with CPAP therapy, is shown to improve erectile function in a meaningful number of men. A prospective study of men with obstructive sleep apnea syndrome (OSAS) and ED showed that 3 months of CPAP use led to a statistically significant increase in IIEF‑5 scores (from the mild–moderate ED range toward better function), indicating meaningful improvement in erectile function. Some men have milder residual ED after successful treatment, which is common enough to be treated as a separate, less-serious problem. 

If your partner, or a sleep-monitoring app, has mentioned loud snoring, gasping, or pauses in your breathing during sleep, or your mornings consistently start with a headache despite eight hours in bed, that’s a more useful clue than simply feeling tired, and it’s worth mentioning to a doctor specifically. 

How to Tell If This Is You

The most useful thing you can do about sleep and erectile function is not a habit change, but taking steps to find out whether you have obstructive sleep apnea. Put plainly, OSA is diagnosable, treatable, and associated with erectile improvement on treatment at a scale that no amount of sleep hygiene matches. Most men who have it do not know they have it, and the giveaway signs are not the ones people expect. 

Signs that point toward the need for assessment rather than self-management include:

  • Loud snoring, or a partner reporting gasping, choking, or pauses in your breath when you sleep
  • Waking with a headache or a dry mouth, despite having 7-8 hours in bed
  • Daytime sleepiness that coffee doesn’t resolve, that feels different from ordinary tiredness
  • A reduced number, or complete lack, of morning erections
  • Weight gain around the neck and midsection that tracks with when your symptoms started

If two or more of those apply, the best move is to ask your doctor about a sleep study, rather than just describing yourself as tired. “I’m exhausted” tends to lead to conversations about stress, whereas explaining that you’re displaying symptoms from the above list tends to get a referral. Home testing now makes this a far lower-friction request than it used to be.

If OSA is ruled out and your issue is more straightforward sleep debt, the steps to take are unglamorous but fast-acting compared with the other three issues we’re discussing here. Consistently getting 7-8 hours sleep, a stable wake-and-sleep time, and treating alcohol as a sleep disruptor rather than a sleep aid. Testosterone that’s suppressed by a short-term sleep restriction recovers in days or weeks, not the months that vascular changes need.

Correcting your sleep can remove an active contributing factor for ED and stop ongoing vascular damage, but it does not undo damage that’s already been done. As such, if your ED doesn’t shift at all once sleep is fixed, that’s useful information to continue your investigations, rather than any failure on your behalf. 

Does Diet Actually Affect Erectile Function?

Diet affects erectile function through two connected pathways: direct vascular effects of dietary pattern, independent of weight, and the indirect effects of weight loss and improved metabolic health. A Mediterranean-style diet, high in vegetables, fish, olive oil, and whole grains, low in processed and red meat, has been associated with meaningfully improved erectile function scores, with more men reaching normal-range IIEF scores.

In medical terms, the thing that connects diet with ED is something called “metabolic syndrome”. This condition is a combination of issues, including high blood pressure, high blood sugar, excess abdominal fat, and abnormal cholesterol that damages blood vessels throughout the body, including the ones responsible for erections. Metabolic syndrome is thought to affect 38.5% of adults in the United States, and it’s not driven by any single “bad food” or specific food group, but instead by the sustained strain that a poor overall diet, combined with excess weight, puts on the body.

As you may be able to guess, weight loss itself, separate from any specific diet, is one of the most consistently supported interventions for men who are overweight or obese. The thing to be clear about here though, is that weight loss most reliably helps where ED has a vascular or metabolic factor, and changes to eating will not meaningfully change ED that’s been caused by nerve damage or structural issues, no matter how much body fat comes off. 

What This Looks Like in Practice

The dietary evidence points at patterns of food rather than individual foods, and that distinction is why searches for “best food for ED” are largely worthless. In reality, the studies showing erectile-function improvement tested Mediterranean-style eating as a complete pattern.

  • Build meals around vegetables, legumes, whole grains, nuts, and olive oil as a default fat
  • Eat fish twice a week or more, and make red and processed meats occasional rather than routine
  • Cut sugar-sweetened drinks and refined carbohydrates first; this is the fastest blood-sugar leveler available
  • If currently overweight, aim for at least 10% body-weight loss, which is the studied amount, rather than a whole number you’ve decided on
  • Track waist circumference alongside weight, since abdominal fat is what drives metabolic syndrome
  • Reduce alcohol, which hits the vascular pathway and the sleep pathway at the same time

Two effects are running in parallel here, and it helps to know which one you are chasing. The dietary pattern itself appears to improve vascular function, while weight loss itself works through metabolic syndrome; blood pressure, blood sugar, and cholesterol improve together. A man at a healthy weight eating badly has the first lever available to him and not the second.

Diet works on the vascular and metabolic contributors, but it’s important to understand that it does not touch nerve injury, and it will not resolve ED that is primarily anxiety-driven, where the mechanism is the nervous system rather than the blood supply.

How Does Stress Cause or Worsen ED?

Stress causes or worsens ED primarily through the sympathetic nervous system, the "fight or flight" branch, which actively works against the parasympathetic (relaxed) response required to trigger and sustain an erection. Elevated cortisol and sympathetic activation constrict blood vessels and suppress the exact vasodilation an erection depends on, meaning a stressed nervous system is, mechanically, pulling the opposite direction from what is needed in that moment.

This might be ringing true with you, especially because it’s a pattern that many men recognize but don’t connect to biology. For example, a stressful time might cause a temporary erection problem, which triggers anxiety about the next attempt, which then becomes a second, self-reinforcing source of sympathetic activation in the brain. Even in the short term, the original thing that was causing stress and the secondary performance anxiety can become hard to separate from one another, and another ongoing layer of stress is added to life. 

Mindfulness-based interventions, including structured programs that combine meditation with cognitive techniques, have shown “promising improvements” in men whose ED has a significant stress or anxiety component. To be absolutely clear, this isn’t a claim that stress management alone will resolve ED with a structural or vascular cause, but where an over-active sympathetic drive in the brain is genuinely part of the picture, it may help to address the nervous-system mechanism directly, rather than indirectly through the vascular system.

What This Looks Like in Practice

Although stress-reduction advice is getting better, online information is generic and doesn’t match the interventions that have erectile-function evidence behind them. In the studies that have shown benefits, structured programs have been used. 

To work out which stress-reduction route is more likely to suit you, it’s useful to understand which of the two different stress-related issues applies to you.

Question: Do you feel your stress is related to general life, or more specifically to sexual situations with a partner? This is important to answer since there are different mechanisms at play, and therefore different treatments.

TYPE OF STRESS  RECOMMENDED APPROACH
For general stress
  • A structured mindfulness program, typically over eight weeks, with daily practice
  • Ten to twenty minutes daily beats an hour once a week; the effect comes from consistency.
  • Aerobic exercise plays a part here too, since it regulates sympathetic tone as well as vascular function
  • Drop alcohol as a wind-down tool, since it fragments sleep and worsens the  vascular pathway.
For partner-specific, sexual situation stress:
  • Targeted therapy is a better fit than general stress reduction
  • Specialized cognitive behavioral approaches or sex therapy should be explored

We’ve explored this second kind of anxiety-driven psychogenic ED in more detail in this dedicated guide, including more information on breaking the cycle. While there are proven routes to dealing with these issues, it’s important to know that reducing sympathetic overdrive restores the nervous system's ability to permit an erection. It cannot supply blood flow that the vasculature is no longer capable of delivering. Where both are in play, and in men over forty they often are, stress work makes the vascular capacity you have accessible, which is not the same as increasing it. 

So Where Does Lifestyle Change Fit Into the Bigger ED Picture?

Lifestyle change is genuinely sufficient on its own for a meaningful number of men whose ED is driven primarily by vascular, metabolic, or stress-related contributors, but it is best understood as a real, evidence-based first step to take seriously for several months, not a lifelong substitute for medical evaluation if it does not work. The better lifestyle change tends to work, the more likely the cause is one of the mechanisms it targets; the less it works despite real effort, the more that itself is diagnostic information.

The right kind of trial of these lifestyle factors is one that involves genuine, consistent effort in all four areas for 3-6 months, before trying to come to any conclusions. This kind of timescale is important, simply because the kind of vascular and hormonal changes you’re trying to make show up over months, not days.

As you get toward 3 months of consistent change, it’s worth being on the lookout for any indications that self-directed changes to lifestyle aren’t enough. Such indications might include:

  • ED that is consistent, rather than situational
  • No improvement in symptoms at all
  • Other symptoms being discovered, such as chest pain, unusual fatigue, numbness, or the sleep-apnea signs mentioned earlier

When to See Your Doctor

What we’ve covered in this article is worth giving a number of months, but some things need more urgent attention. If any of the following apply, you should make an appointment to see your doctor sooner rather than later, and let the lifestyle changes carry on alongside it:

  • Chest pain, tightness, or breathlessness
  • Erections that have changed suddenly, rather than gradually
  • A change that happened within weeks of starting a new medication
  • A partner/app describing gasping, choking, or stopping breathing in your sleep

Erectile function is something that sits downstream of vascular health issues, which is why a change in erections can be an early warning of a problem elsewhere. Bringing it up with your doctor early doesn’t mean you can’t continue with lifestyle changes, and it’s a conversation they will have already had this week, so there’s no embarrassment needed.

Frequently Asked Questions

  1. How long does it take for lifestyle changes to improve ED?
    Most studies measuring the effect of exercise, diet, or weight loss on erectile function show improvement over 3-6 months of consistent effort, though timelines vary. Sleep-related improvements, particularly from treating obstructive sleep apnea, can show benefits somewhat faster. A realistic expectation is gradual improvement over months, not a rapid change.
  2. Can losing weight alone fix erectile dysfunction?
    For men whose ED is driven primarily by metabolic syndrome or vascular strain from excess weight, meaningful weight loss can substantially improve or resolve it. It is much less likely to help ED caused by nerve damage, structural tissue changes, or medication side effects, which is why weight loss works best as part of a broader approach rather than a single fix.
  3. Does quitting smoking or drinking less actually help ED?
    Yes. Smoking and heavy drinking both damage the blood vessels and nitric oxide signaling erections depend on. In smokers with ED, quitting improved erectile function in about one in four men over a year. In heavy drinkers with ED, roughly 9 in 10 improved after three months of alcohol abstinence.
  4. I've been eating better and exercising for months, and nothing's changed. Does that mean something else is going on?
    It might. Consistent lifestyle change with no improvement over several months is one of the clearer signals that the underlying cause may not be primarily lifestyle-driven; it could be structural, neurological, hormonal, or medication-related. That is a reasonable, common point to raise with a doctor, not a sign you have not tried hard enough.
  5. What’s the best way to approach lifestyle change?
    Consistency is the key. Rather than aiming for large lifestyle changes that you’ll struggle to adhere to, it’s a good idea to choose some small positive changes that become habit with little effort, before building on those with more small changes. Over time, these small low-effort changes are easier to maintain than big lifestyle overhauls that are unlikely to stick.

Conclusion

Making some lifestyle changes to see if they improve the symptoms of ED has few, if any, downsides. If they have a positive effect on your symptoms, it’s an excellent step for both intimacy and overall well-being. On the other hand, if you don’t see any improvements, they’re a strong indicator that you should talk to a medical professional for further investigation.

Since changes to your health habits represent this kind of test, it’s useful to approach them in a methodical way. Start by writing down what’s happening: how often you’re getting erections, whether they’re firm enough for intercourse, whether they fail to start or fail to last, whether it happens every time or only with a partner, and whether you are still waking up with them. Five lines in a note on your phone is enough. Men are unreliable narrators of their own gradual change, in both directions; it’s common to either forget how bad it was or convince yourself nothing has moved when something has. 

When you have your starting point, give the lifestyle adjustments a try in all four areas. It’s a good idea to start small and build, not least because big, sudden changes to routines and habits rarely stick. Choose something to start with in each area, and, when that becomes habit, add another habit to stack on top of that.

If things improve and flatten out short of where you want them, you may have found your ceiling. That can mean that part of the cause is vascular or metabolic, and part of it isn’t. This is a good point to talk about the situation with your doctor. Of course, if nothing changes despite honest, consistent effort, it’s not a failure; it’s a clear signal that whatever’s driving your ED isn’t about how you’ve been living, and that’s worth saying to your doctor, in exactly those terms.

References

Nicolosi A, Moreira ED, Shirai M, Bin Mohd Tambi MI, Glasser DB. "Epidemiology of erectile dysfunction in four countries: cross-national study of the prevalence and correlates of erectile dysfunction." Urology, 2003. https://www.sciencedirect.com/science/article/abs/pii/S0090429502021027

Lamina S, Agbanusi E, Nwacha RC. "Effects of aerobic exercise in the management of erectile dysfunction: a meta analysis study on randomized controlled trials." Ethiopian Journal of Health Sciences, 2011.  https://pmc.ncbi.nlm.nih.gov/articles/PMC3275865/

Dorey G, Speakman M, Feneley R, Swinkels A, Dunn C, Ewings P. "Randomised controlled trial of pelvic floor muscle exercises and manometric biofeedback for erectile dysfunction." British Journal of General Practice, 2004. https://pmc.ncbi.nlm.nih.gov/articles/PMC1324914/

Gerbild H, Larsen CM, Graugaard C, Areskoug Josefsson K. "Physical Activity to Improve Erectile Function: A Systematic Review of Intervention Studies." Sexual Medicine, 2018. https://pmc.ncbi.nlm.nih.gov/articles/PMC5960035/

Slowik JM, Sankari A, Collen JF. "Obstructive Sleep Apnea." StatPearls [Internet]. StatPearls Publishing, 2026. https://www.ncbi.nlm.nih.gov/books/NBK459252/ 

Gu Y, Wu C, Qin F, Yuan J. "Erectile Dysfunction and Obstructive Sleep Apnea: A Review." Frontiers in Psychiatry, 2022. https://pmc.ncbi.nlm.nih.gov/articles/PMC9178074/

ScienceDirect. "Sleep Debt." ScienceDirect Topics (Medicine and Dentistry), [n.d.]. https://www.sciencedirect.com/topics/medicine-and-dentistry/sleep-debt 

Ravesloot MJ, van Maanen JP, Hilgevoord AA, van Wagensveld BA, de Vries N. "Obstructive sleep apnea is underrecognized and underdiagnosed in patients undergoing bariatric surgery." European Archives of Oto-Rhino-Laryngology, 2012. https://pmc.ncbi.nlm.nih.gov/articles/PMC3365234/

Husnu T, Ersoz A, Bulent E, Tacettin O, Remzi A, Bulent A, Aydin M. "Obstructive sleep apnea syndrome and erectile dysfunction: does long term continuous positive airway pressure therapy improve erections?" African Health Sciences, 2015. https://pmc.ncbi.nlm.nih.gov/articles/PMC4370127/

Johns Hopkins Medicine. "4 Signs You Might Have Sleep Apnea." Johns Hopkins Medicine, [n.d.]. https://www.hopkinsmedicine.org/health/wellness-and-prevention/4-signs-you-might-have-sleep-apnea

Esposito K, Ciotola M, Giugliano F, De Sio M, Giugliano G, D'Armiento M, Giugliano D. "Mediterranean diet improves erectile function in subjects with the metabolic syndrome." International Journal of Impotence Research, 2006. https://pubmed.ncbi.nlm.nih.gov/16395320/

American Heart Association. "About Metabolic Syndrome." American Heart Association, [n.d.]. https://www.heart.org/en/health-topics/metabolic-syndrome/about-metabolic-syndrome 

Abohashem S, Hassan I, Wasfy JH, Taub PR. "Trends and Prevalence of the Metabolic Syndrome Among US Adults." JAMA, 2025. https://jamanetwork.com/journals/jama/fullarticle/2842706

Gottlieb S. "Obese men can regain sexual function by losing weight and exercising." BMJ, 2004. https://pmc.ncbi.nlm.nih.gov/articles/PMC437137/

Tostes RC, Carneiro FS, Lee AJ, Giachini FR, Leite R, Osawa Y, Webb RC. "Cigarette smoking and erectile dysfunction: focus on NO bioavailability and ROS generation." The Journal of Sexual Medicine, 2008. https://pmc.ncbi.nlm.nih.gov/articles/PMC3003263/

Karunakaran A, Michael JP. "The Impact of Abstinence From Alcohol on Erectile Dysfunction: A Prospective Follow up in Patients With Alcohol Use Disorder." The Journal of Sexual Medicine, 2022. https://pubmed.ncbi.nlm.nih.gov/35236641/

Jacob Tindle; Prasanna Tadi. “Neuroanatomy, Parasympathetic Nervous System“ StatPearls, 2022. https://www.ncbi.nlm.nih.gov/books/NBK553141/

Dean RC, Lue TF. "Physiology of penile erection and pathophysiology of erectile dysfunction." Urologic Clinics of North America, 2005. https://pmc.ncbi.nlm.nih.gov/articles/PMC1351051/

Valderrama Rodríguez MF, Sánchez-Sánchez LC, García-Montes JM, Petisco-Rodríguez C. "A Scoping Review of the Influence of Mindfulness on Men's Sexual Activity." International Journal of Environmental Research and Public Health, 2023. https://pmc.ncbi.nlm.nih.gov/articles/PMC9966447/

Li T, He X, Huang W, Liu G, Feng Q. "Efficacy of lifestyle interventions in treating erectile dysfunction: a systematic review and meta-analysis of randomized controlled trials." The Journal of Sexual Medicine, 2026. https://academic.oup.com/jsm/article/23/6/qdag137/8680197

How we work to provide accurate and reliable information on the blog

We put in extensive effort to ensure that each blog post on our site delivers valuable and trustworthy information to our readers. These are our main focus areas:

  • Exhaustive research and fact-checking
  • Use of Reliable and Reputable Sources
  • Collaboration with Experts
Read our Editorial Principles

Join the Mailing List & Get $10 Off

Sign up to get $10 off your first order of $50 or more.