Losing your erection during sex is one of the most common sexual experiences men have, and in most cases it doesn’t signal a medical problem. About 25% of men between ages 40 and 70 experience intermittent erection difficulties, and the real number across all ages is likely higher since younger men rarely report it. A one-off episode, or even a recurring pattern tied to specific situations, usually comes down to a handful of explainable causes.
How Erections Work (and Stop Working)
An erection depends on a chain of chemical signals that relax smooth muscle tissue in the penis, allowing blood to flow in and stay trapped there. The key player is nitric oxide, a molecule released by nerves and blood vessel walls during arousal. Nitric oxide triggers a cascade that relaxes the penile arteries and the spongy tissue inside the shaft, while simultaneously compressing the veins so blood can’t drain back out.
Anything that interrupts this process, whether it’s a stress hormone, a chemical from alcohol, or a blood vessel that doesn’t dilate properly, can cause you to lose firmness mid-act. The system is surprisingly sensitive, which is why so many different factors can knock it offline.
Anxiety Is the Most Common Culprit
If you went soft during sex and you’re otherwise healthy, anxiety is the most likely explanation. It doesn’t have to feel like a panic attack. Even low-level worry about performance, body image, or pleasing your partner activates your sympathetic nervous system, the same fight-or-flight response you’d get from a sudden scare. That response speeds up your heart rate, deepens your breathing, and actively shuts down functions your body considers non-essential for survival. Erections are one of those functions.
This creates a frustrating feedback loop. You notice you’re losing firmness, which makes you anxious, which pushes more adrenaline into your system, which makes the erection harder to maintain. The more you focus on it, the worse it gets. New partners, unfamiliar settings, relationship tension, or even just being tired and distracted can all set this cycle in motion without you fully realizing it.
Alcohol and Other Substances
If you’d been drinking before sex, that’s a strong candidate. Alcohol interferes with erections in two ways at once. First, it dampens the brain signals needed to initiate and sustain arousal. Second, it dilates blood vessels throughout your body, which drops blood pressure and reduces the focused blood flow your penis needs to stay hard. Even a moderate amount can be enough to tip the balance, especially combined with fatigue or mild anxiety.
Nicotine is another common offender. Smoking constricts blood vessels, which directly limits the blood supply available for an erection. Cannabis can go either way depending on the dose and the person, but higher amounts tend to dull arousal signals in the brain.
Poor Sleep and Low Energy
Sleep has a surprisingly strong connection to erectile function. A large U.S. database study found that men with insomnia were 30% more likely to have erectile difficulties and 74% more likely to have low testosterone compared to men who slept well. Men with disrupted sleep-wake cycles (shift workers, for example) had even higher odds. Your body produces most of its testosterone during deep sleep, so chronic sleep debt can quietly erode the hormonal foundation that supports arousal and erection quality. Even one or two nights of poor sleep before a sexual encounter can make a noticeable difference.
Medications That Interfere
If you recently started or changed a medication, that may be the connection. Antidepressants in the SSRI class (commonly prescribed for depression and anxiety) cause sexual side effects in roughly 20% to 70% of people taking them. These effects include trouble getting aroused, difficulty maintaining erections, and delayed or absent orgasm. The mechanism involves elevated serotonin levels interfering with the arousal pathways that normally support blood flow to the penis.
Blood pressure medications, antihistamines, and some anti-anxiety drugs can also affect erection quality. If the timing lines up with a prescription change, it’s worth a conversation with whoever prescribed it. Some alternatives within the same drug class carry a lower risk of sexual side effects.
When It Might Be Physical
Occasional erection loss during sex is normal. The clinical threshold for erectile disorder is much higher than most men realize: symptoms need to occur on at least 75% of sexual occasions and persist for at least six months before it meets diagnostic criteria. A few bad nights, or even a rough month during a stressful period, doesn’t qualify.
That said, consistent difficulty maintaining erections can sometimes be an early sign of cardiovascular problems. The arteries supplying the penis are smaller than those feeding the heart, so they tend to show the effects of plaque buildup first. Research from the American Heart Association found that erectile dysfunction often appears three to five years before a heart attack or stroke, giving men a meaningful window to address the underlying issue. This is most relevant for men over 40, especially those with risk factors like high blood pressure, high cholesterol, diabetes, or a smoking history. If erection problems are persistent and progressive rather than situational, it’s worth getting your cardiovascular health checked.
What You Can Do About It
The fix depends on the cause, but a few strategies help across the board.
For anxiety-driven erection loss, the most effective in-the-moment technique is redirecting your attention away from your erection and toward physical sensation. Mayo Clinic recommends a sensory mindfulness approach: focus on what you feel, smell, hear, and see during sex. Sync your breathing with your partner’s. The goal is to pull your brain out of the monitoring-and-evaluating mode that feeds the anxiety loop and back into the physical experience. This takes practice, but it works because it directly counters the mental pattern that activates your fight-or-flight response.
For lifestyle-related causes, the changes are straightforward. Cut back on alcohol before sex, or skip it entirely and see if that makes a difference. Prioritize sleep, especially in the days leading up to when you expect to be sexually active. Regular cardiovascular exercise improves blood vessel health and nitric oxide production, both of which directly support erection quality.
If the issue keeps happening regardless of the situation, your stress level, or your substance use, a blood test checking testosterone, blood sugar, and cholesterol can help rule out or identify a physical cause. For many men, though, the explanation is a combination of stress, fatigue, and alcohol that happened to converge on the same night. Recognizing how common and explainable it is can, by itself, reduce the anxiety that makes it more likely to happen again.

