Sudden erectile dysfunction: why it happens out of nowhere

Sudden erectile dysfunction usually means something changed recently. When reliable erections start failing within days or weeks, the likely causes are worry after one bad night, stress or low mood, a new or strained relationship, a new medicine, and alcohol or drugs. Diseases that damage blood vessels and nerves tend to build up slowly.

The quickest clue is what happens when nothing is at stake. If you still wake up hard or get firm erections on your own, the machinery probably works, and the trouble likely starts with the situation. If erections have stopped in every situation, or the change came with an injury or a new medicine, see a doctor. Back pain with new erection trouble, especially with numbness around your genitals or changes in your bladder or bowels, needs emergency care.

A dirt track splitting into two paths in a green forest

Is sudden erectile dysfunction normal?

One night when you can’t get hard isn’t erectile dysfunction. Most men occasionally fail to get or keep an erection, according to Britain’s National Health Service (NHS), and stress, tiredness or too much alcohol is usually behind it. Doctors reserve the term for a persistent problem, one that keeps getting in the way of sex, and our explainer on what erectile dysfunction is shows where that line sits.

What matters after a miss is what happens next. A one-off needs nothing. A miss that repeats, or one that leaves you dreading the next attempt, deserves a closer look.

Why can’t I get hard all of a sudden?

When erections change quickly, look for a cause that acts quickly: something that sets off the body’s stress response, dulls arousal or comes with a new prescription. If the change crept up over months instead, our guide to why you can’t get hard covers the slower causes too.

One bad night, then the fear of a repeat

One night you’re tired, tipsy or distracted, and the erection fades. The next time, part of your attention is on your penis instead of your partner, waiting to see whether it happens again. Researchers call that habit spectatoring. When they surveyed 512 men in relationships, the ones who did it more had more erection trouble.

There’s a physical reason worry works against you. An erection needs the smooth muscle inside the penis to relax so blood can rush in. Stress chemicals such as norepinephrine keep that muscle tight, and higher levels of norepinephrine have been found in men whose erection problems are psychological.

This kind of worry is called sexual performance anxiety. It affects an estimated 9% to 25% of men, and a paper in Sexual Medicine Reviews links it to the most common sexual problems, from premature ejaculation to psychological erection trouble. We’ve covered how performance anxiety works and how to ease it in detail.

Stress, poor sleep and low mood

Pressure at work, money trouble, grief or a run of short nights can all show up in bed. European urology guidelines note that erection problems often go hand in hand with distress, including the low mood that can follow a crisis.

The link with depression runs both ways. Across 49 studies, men with depression had about 39% higher odds of erectile dysfunction, and men with erectile dysfunction had nearly three times the odds of depression. If your mood has been low for weeks, mention it to a doctor along with the erection trouble; treating low mood may be the first step.

A new partner, or trouble with the one you have

Erections are sensitive to context. A new partner, a strained relationship or a fight that never got settled can be enough. Doctors call this situational erectile dysfunction: it shows up with a particular partner or in particular circumstances, while erections at other times stay fine. A review in American Family Physician explains why performance anxiety and relationship conflict get in the way: both pull attention away from arousal.

A new medicine

If the trouble began soon after you started a prescription, look at the pill first. Antidepressants are a common cause, especially SSRIs such as fluoxetine and sertraline. Among blood pressure drugs, water pills called thiazides are the most frequent culprits, followed by beta blockers. Antihistamines, opioid painkillers and finasteride, which is taken for an enlarged prostate and for hair loss, can cause erection problems too. For finasteride, the National Library of Medicine’s MedlinePlus warns that erection problems may occur during treatment and after it ends.

Never stop a medicine on your own; tell the doctor who prescribed it instead. A different medicine may be an option, and some antidepressants are less likely to affect erections than others.

Alcohol and drugs

The dose matters. Back in the 1970s, researchers gave 16 young men three measured doses of alcohol and tracked their erections. The smallest dose produced the strongest response of the three, but from a blood alcohol level of 0.05% upward, erections were markedly suppressed. A heavy night can explain a miss on that night. A habit of drinking before sex can explain a pattern.

Marijuana, cocaine, amphetamines and opioids all appear on medical lists of drugs that can cause erection problems, and European guidelines add anabolic steroids.

When the cause is physical

Most physical causes, such as narrowed arteries, diabetes and low testosterone, build slowly, which is why a gradual slide points toward the body. A few start abruptly: pelvic surgery, an injury to the penis or pelvis, and pressure on the nerves at the base of the spine, an emergency covered below. For the full list, see what causes erectile dysfunction.

A seven-day check to find your pattern

Before you decide what’s behind it, collect a week of evidence. Take a minute each evening to note the items below, then put the notes away. Checking your erections all day turns the log into another test, which feeds the spectatoring described above. If a warning sign from the doctor section below applies, skip the log and get checked first.

Note each dayWhy it matters
Erection on waking, and how firmErections on waking come without performance pressure, so good ones suggest the blood vessels and nerves work
Erection on your own, and how firmFirm erections when you masturbate point toward the situation rather than the body
Sex or an attempt with a partner: how firm, and what was on your mindShows which moments switch you off
Drinks or drugs in the hours before sexErections weaken once blood alcohol climbs, and several drugs can cause erection problems
Hours of sleep, and stress on a 0–10 scaleTiredness and stress are the usual reasons for an occasional miss
Any new medicineMany medicines list erection problems as a side effect
Pain, a new bend or lump, numbness around the genitals, or changes when you peeDon’t wait out the week: see a doctor, and go to the ER if these come with back pain (see below)

For firmness, use the Erection Hardness Score, a one-question scale that researchers have validated: 1 means larger but not hard, 2 hard but not hard enough for penetration, 3 hard enough for penetration but not completely hard, and 4 completely hard and fully rigid.

At the end of the week, look for the pattern that fits best:

  • Firm on waking or alone, weak with a partner. The machinery is probably working, and the trouble most likely comes from pressure, stress or the relationship. Psychological erection problems are most common in men under 40.
  • Weak or absent in every situation, including on waking. A physical cause is more likely. Make a doctor’s appointment instead of waiting it out.
  • Fine except after drinking. Alcohol is the obvious suspect. Try a few sober nights and compare.
  • Changed soon after a new prescription. Talk to the prescriber, and keep taking the medicine until you do.
  • A bit of everything. That’s common. European guidelines note that most cases have mixed causes, and a doctor can help sort the physical part from the rest.

Morning erections are a useful clue, not a verdict. Erections during sleep don’t always match the ones you get during sex, and tests that measure them can mislead in older or anxious men. The details are in our post on morning wood.

Firm on your own, not with a partner?

That pattern usually points to the mind, not the body. Keep It Hard in The Coach app has practices for calming the stress response and handling the moments that switch you off; the quiz shows where to start.

When to see a doctor

Most sudden changes have everyday causes, but some need medical care, and two can’t wait.

Go to the emergency room now if:

  • you have back pain and new erection trouble, especially with numbness around your genitals or anus or changes in your bladder or bowels. Together these can mean pressure on the nerves at the base of the spine, called cauda equina syndrome. It’s rare, affecting an estimated 1 in 30,000 to 100,000 people a year, but quick treatment lowers the risk of lasting damage.
  • you heard a pop or crack during sex, lost the erection right away and have pain, swelling or bruising. That’s a penile fracture, and it’s an emergency too.

See a doctor soon if:

  • you can’t get an erection in any situation, including on waking or on your own
  • it started soon after you began a new medicine
  • it followed pelvic surgery, radiation therapy or an injury
  • your penis has a new bend or a lump, or erections hurt
  • you have diabetes, high blood pressure, high cholesterol or heart disease, or you smoke
  • it keeps happening, even after the obvious causes are gone

Younger men have more reason to get checked, not less. A long-running Minnesota study of 1,402 men showed why: those in their 40s who had erectile dysfunction developed coronary artery disease at a rate of about 49 cases per 1,000 men a year, compared with about one per 1,000 among men the same age without it. In older men, erection trouble predicted little. So in a younger man, erection problems that last are worth a checkup even when stress seems to explain them.

What helps when it starts suddenly

Pushing for an erection tends to backfire, because pressure is what feeds the body’s stress alarm. The aim is to lower the pressure and deal with whatever changed, so your body can relearn that sex is safe.

Start by taking the test out of sex. For a while, agree with your partner to leave intercourse off the menu and enjoy touch that has no finish line. With no erection to prove, the alarm has less to react to. Lowering anxiety step by step is a standard part of sex therapy for this kind of problem. If it happens in the middle of sex, here’s what to do in the moment.

Don’t let the break turn into avoidance, though. Skipping intimacy after a few bad nights feels protective, but each attempt you put off makes the next one loom larger, so stay close in low-pressure ways.

Slow breathing helps on tense nights. Breathing at fewer than 10 breaths a minute shifts the nervous system toward its calm mode and eases anxiety, according to a review of 15 studies in healthy people. Practice on calm days, so it comes naturally when you need it.

Then fix the obvious: drink less before sex and protect your sleep.

Tell your partner what’s going on. Explain briefly and calmly that this is new to you and what helps you relax. That replaces guessing with a plan. European guidelines recommend cognitive behavioral therapy for erection problems with a psychological component, ideally with the partner involved.

If it lingers, see a doctor. ED pills can help some men break the cycle, and a doctor decides whether they’re right for you. At one New York clinic, 116 men whose erection problems had no physical cause on testing were given a trial of the pills. Of those, 81% responded, and about a year later most of the responders had stopped taking them because they no longer needed them. If you want to know what pills can and can’t do, along with a six-week plan for the mind side, read our guide to psychological erectile dysfunction.

Sudden erectile dysfunction in your 20s and 30s

Erection trouble has long been seen as an older man’s problem, so a sudden failure at 21 or 25 can feel alarming. It’s more common than you might think. In a study of 439 men seeking help for the first time with new erection problems, one in four was 40 or younger, and almost half of those young men had severe symptoms. Large studies put erectile dysfunction in young men at up to 30%.

In young men, psychological trouble tends to come on suddenly while erections alone or on waking stay good. But the young patients in that study also smoked and used illicit drugs more often than the older ones, so habits matter too, and if you take finasteride for hair loss, mention it to your doctor. Since erection trouble was a stronger heart warning in men in their 40s than in older men, a checkup makes sense if the problem lasts. There’s more on erectile dysfunction in young men, including what helps in your 20s and 30s.

How The Coach helps with sudden erection trouble

The Keep It Hard program in The Coach app starts with the same sorting question you worked through above. Its rule of thumb: if you can’t get an erection in any situation, a physical cause is more likely, and a doctor’s appointment comes first.

Much of the program targets the pattern sudden trouble usually follows: fine on your own, failing when it counts. Box breathing and a grounding drill that uses your five senses calm the stress response. Then you map your triggers, the situations that switch you off. The program pays special attention to one of them: noticing that your erection has softened a little, even though hardness naturally rises and falls during sex. You learn to plan around the triggers you can’t avoid and to tell your partner what helps. A soft-penis practice, 10 minutes three times a week for two weeks, is meant to take the sting out of softness, and a solo arousal exercise has you let an erection fade by half and bring it back, so losing it can stop feeling final.

The practices fit into a daily plan of about 10 to 20 minutes. The app can’t examine you or run tests, so the warning signs above still go to a doctor first. The Coach app for men has more than 1 million downloads and a 4.7 rating on the App Store. The quiz below builds a plan around your answers.

See where your plan would start

Answer a few questions, and The Coach suggests which Keep It Hard practices to begin with.

Questions about sudden erectile dysfunction

Will sudden erectile dysfunction go away on its own?

Often, if its cause passes and worry doesn’t take over. Erection problems come and go more than most men think. When researchers in Massachusetts followed 401 men aged 40 to 70 with erectile dysfunction, 35% no longer had it at follow-up, and in an Australian study, 29% of men with erectile dysfunction no longer had it five years later. Those studies followed erection problems of every kind in middle-aged and older men, not sudden cases in particular. Worry about the next attempt is a common reason a sudden problem lingers, which is why taking the pressure off matters. Our separate guide covers how long sudden erection trouble tends to last, cause by cause.

Why can I get hard alone but not with my partner?

Because masturbation takes away most of the pressure. Doctors read firm erections on your own as a sign that the blood vessels and nerves work and that the cause is more likely psychological, such as anxiety about performance or tension in the relationship. The machinery is probably fine, so the work lies in the situation. Start with the steps above, and see a doctor or sex therapist if it doesn’t ease.

Sources

  1. NHS (2023). Erectile dysfunction (impotence). NHS. https://www.nhs.uk/conditions/erection-problems-erectile-dysfunction/
  2. European Association of Urology (2026). EAU Guidelines on Sexual and Reproductive Health: Management of erectile dysfunction. European Association of Urology. https://uroweb.org/guidelines/sexual-and-reproductive-health/chapter/management-of-erectile-dysfunction
  3. Wyatt RB, de Jong DC, Holden CJ (2019). Spectatoring mediates the association between penis appearance concerns and sexual dysfunction. Journal of Sex & Marital Therapy. https://pubmed.ncbi.nlm.nih.gov/30595102/
  4. Dean RC, Lue TF (2005). Physiology of penile erection and pathophysiology of erectile dysfunction. Urologic Clinics of North America. https://pmc.ncbi.nlm.nih.gov/articles/PMC1351051/
  5. Pyke RE (2020). Sexual performance anxiety. Sexual Medicine Reviews. https://pubmed.ncbi.nlm.nih.gov/31447414/
  6. Liu Q, Zhang Y, Wang J, et al. (2018). Erectile dysfunction and depression: a systematic review and meta-analysis. Journal of Sexual Medicine. https://pubmed.ncbi.nlm.nih.gov/29960891/
  7. Rew KT, Heidelbaugh JJ (2016). Erectile dysfunction. American Family Physician. https://www.aafp.org/pubs/afp/issues/2016/1115/p820.html
  8. MedlinePlus (2025). Drugs that may cause erection problems. U.S. National Library of Medicine. https://medlineplus.gov/ency/article/004024.htm
  9. MedlinePlus (2026). Finasteride. U.S. National Library of Medicine. https://medlineplus.gov/druginfo/meds/a698016.html
  10. Farkas GM, Rosen RC (1976). Effect of alcohol on elicited male sexual response. Journal of Studies on Alcohol. https://pubmed.ncbi.nlm.nih.gov/4660/
  11. NHS Lothian (2024). Psychogenic versus organic erectile dysfunction. NHS Lothian. https://apps.nhslothian.scot/files/sites/2/Psychogenic-versus-organic-Erectile-Dysfunction.pdf
  12. Mulhall JP, Goldstein I, Bushmakin AG, Cappelleri JC, Hvidsten K (2007). Validation of the erection hardness score. Journal of Sexual Medicine. https://pubmed.ncbi.nlm.nih.gov/17888069/
  13. Goldstein I, Mulhall JP, Bushmakin AG, et al. (2008). The erection hardness score and its relationship to successful sexual intercourse. Journal of Sexual Medicine. https://pubmed.ncbi.nlm.nih.gov/18624971/
  14. NHS (2026). Back pain. NHS. https://www.nhs.uk/conditions/back-pain/
  15. Cleveland Clinic (2026). Cauda equina syndrome. Cleveland Clinic. https://my.clevelandclinic.org/health/diseases/22132-cauda-equina-syndrome
  16. Cleveland Clinic (2025). Penile fracture. Cleveland Clinic. https://my.clevelandclinic.org/health/diseases/21707-penile-fracture
  17. NHS (2024). Peyronie’s disease. NHS. https://www.nhs.uk/conditions/peyronies-disease/
  18. Inman BA, St Sauver JL, Jacobson DJ, et al. (2009). A population-based, longitudinal study of erectile dysfunction and future coronary artery disease. Mayo Clinic Proceedings. https://pubmed.ncbi.nlm.nih.gov/19181643/
  19. Rosen RC (2001). Psychogenic erectile dysfunction. Classification and management. Urologic Clinics of North America. https://pubmed.ncbi.nlm.nih.gov/11402580/
  20. Zaccaro A, Piarulli A, Laurino M, et al. (2018). How breath-control can change your life: a systematic review on psycho-physiological correlates of slow breathing. Frontiers in Human Neuroscience. https://pubmed.ncbi.nlm.nih.gov/30245619/
  21. Jenkins LC, Hall M, Deveci S, et al. (2019). An evaluation of a clinical care pathway for the management of men with nonorganic erectile dysfunction. Journal of Sexual Medicine. https://pubmed.ncbi.nlm.nih.gov/31444103/
  22. Capogrosso P, Colicchia M, Ventimiglia E, et al. (2013). One patient out of four with newly diagnosed erectile dysfunction is a young man: worrisome picture from the everyday clinical practice. Journal of Sexual Medicine. https://pubmed.ncbi.nlm.nih.gov/23651423/
  23. Nguyen HMT, Gabrielson AT, Hellstrom WJG (2017). Erectile dysfunction in young men: a review of the prevalence and risk factors. Sexual Medicine Reviews. https://pubmed.ncbi.nlm.nih.gov/28642047/
  24. Travison TG, Shabsigh R, Araujo AB, et al. (2007). The natural progression and remission of erectile dysfunction: results from the Massachusetts Male Aging Study. Journal of Urology. https://pubmed.ncbi.nlm.nih.gov/17162054/
  25. Martin SA, Atlantis E, Lange K, et al. (2014). Predictors of sexual dysfunction incidence and remission in men. Journal of Sexual Medicine. https://pubmed.ncbi.nlm.nih.gov/24548342/
The Coach Team

The Coach Team

All materials are written by The Coach experts, a team of male health professionals who bring together their extensive knowledge and experience to create informative and empowering content. Our team, accessible at your fingertips, includes 18 leading professionals in various fields such as life coaching, sex therapy, nutrition, and fitness. We believe in a holistic approach to wellness and our diverse team reflects that belief.

The Coach Team

The Coach Team

Posts are authored by The Coach Team, a dedicated collective of men's health experts who bring together their extensive knowledge and experience to create informative and empowering content. Our team, accessible at your fingertips, includes 18 leading professionals in various fields such as life coaching, sex therapy, nutrition, and fitness. We believe in a holistic approach to wellness and our diverse team reflects that belief.

Disclaimer

Although we strive to provide accurate and helpful content, it’s crucial to understand that these articles cannot replace the personalized advice and treatment plan provided by a professional based on an individual’s health condition.

The Coach is committed to enhancing your wellness journey by offering quality content, we want to make it clear that this article is associated with our company. Therefore, it may not cover the full range of other solutions or services available in the market.

Other articles by The Coach

Raindrops on a clear windowpane against a soft gray-blue background

How to squirt: a step-by-step guide

Learning how to squirt starts with arousal, firm come-hither pressure on the front wall of the vagina and letting go when you feel the urge to pee. Here are the five steps, what the fluid is and what to do if nothing happens.

Read More »
A black magnifying glass resting on a small open book on a wooden table, with a larger book in the corner

Does masturbation cause erectile dysfunction?

Does masturbation cause erectile dysfunction? Not on its own. In large studies, how often men masturbate has little to do with their erections. A few habits can matter, though, and the way your erections behave when you’re alone is a useful clue to the cause.

Read More »
Rows of blood collection tubes with colored caps in a laboratory rack

Can low testosterone cause premature ejaculation?

Can low testosterone cause premature ejaculation? Usually not directly: most studies find normal or higher testosterone in men who finish fast. Here’s what the research shows, how weaker erections can link the two, whether testosterone helps and when to get a blood test.

Read More »