Difficulty staying hard is one of the most common sexual health issues men experience, and it rarely comes down to a single cause. About 5% to 10% of men under 40 deal with some degree of erectile difficulty, and by age 40, roughly 39% of men report at least occasional problems. The reasons range from stress and relationship dynamics to blood flow issues, medications, and lifestyle habits. Understanding what’s actually happening in the body makes it easier to figure out what’s going on and what can help.
How Erections Work (and Fail)
An erection depends on a precise chain of events. Sexual arousal triggers the release of nitric oxide in penile tissue, which sets off a chemical cascade that relaxes smooth muscle in the erectile chambers. This relaxation allows blood to rush in through small arteries, and as the chambers fill, they compress the veins that would normally drain blood away. That trapping mechanism is what keeps an erection firm.
Any disruption along this chain can cause problems. If nitric oxide production is low, the smooth muscle doesn’t fully relax. If blood flow is restricted by narrowed arteries, the chambers don’t fill enough to compress the veins. If the nervous system sends the wrong signals, the whole process can stall or reverse. Losing an erection during sex usually means one of these steps isn’t completing properly.
Stress and Anxiety Are the Most Common Cause in Younger Men
The nervous system runs on two competing modes. The parasympathetic system handles relaxation and is responsible for triggering erections. The sympathetic system handles the “fight or flight” response, releasing adrenaline to deal with perceived threats. These two systems work against each other. When the sympathetic system activates, it actively inhibits erections because the body is prioritizing survival over reproduction.
Performance anxiety creates exactly this conflict. A man might be aroused, but the moment he starts worrying about losing his erection, his brain interprets that worry as a threat. His heart rate increases, adrenaline flows, and the very erection he’s anxious about starts to fade. This creates a feedback loop: losing an erection once makes him anxious the next time, which makes it more likely to happen again. Relationship stress, work pressure, financial problems, and general anxiety can all trigger the same sympathetic override.
This pattern is especially common in younger men who don’t have underlying vascular issues. If he wakes up with erections or can maintain one during masturbation but loses it during partnered sex, anxiety is very likely the primary factor.
Blood Flow Problems and Chronic Conditions
Erections are fundamentally a vascular event, so anything that damages blood vessels can interfere with them. High blood pressure, high cholesterol, and heart disease all narrow arteries and reduce the blood flow needed to fill the erectile chambers. In fact, erectile difficulty is sometimes the first warning sign of cardiovascular disease, appearing years before other symptoms.
Diabetes is particularly damaging. Roughly 35% of men with type 2 diabetes experience erectile dysfunction, with some estimates running as high as 90% depending on how long they’ve had the disease and how well their blood sugar is controlled. Persistently high blood sugar creates oxidative stress that directly breaks down nitric oxide, the key chemical that starts the erection process. Over time, it also stiffens blood vessel walls, damages nerves, and reduces the raw materials the body needs to produce nitric oxide in the first place. The result is a compounding problem where multiple systems fail simultaneously.
Obesity plays a role through similar mechanisms. Excess body fat promotes inflammation, disrupts hormone balance (particularly testosterone), and accelerates vascular damage. Losing even a moderate amount of weight can meaningfully improve erectile function in overweight men.
Medications That Interfere
Several widely prescribed medications can make it harder to get or stay hard. The most common culprits are antidepressants in the SSRI class, which include drugs like sertraline, fluoxetine, paroxetine, and escitalopram. These medications boost serotonin levels to treat depression, but that same serotonin increase can suppress arousal, make it difficult to sustain an erection, and delay or prevent orgasm.
Blood pressure medications, particularly older types like beta-blockers and certain diuretics, can also reduce erectile function by lowering blood pressure too aggressively or interfering with nerve signals. Opioid painkillers, some prostate medications, and anti-anxiety drugs round out the list of frequent offenders.
If he started a new medication and noticed a change, that connection is worth exploring with his prescriber. Alternatives often exist. For antidepressants specifically, switching to bupropion or mirtazapine tends to cause fewer sexual side effects, and bupropion can sometimes improve sexual response compared to SSRIs.
Smoking, Alcohol, and Sleep
Smoking damages blood vessel linings throughout the body, including the small arteries in the penis. The effect is dose-dependent and cumulative: the more someone smokes and the longer they’ve smoked, the worse the damage. Quitting doesn’t instantly reverse years of vascular harm, but blood flow does improve over time.
Alcohol has a more complicated relationship with erections. A large meta-analysis found a J-shaped curve: light to moderate drinking (up to about 14 drinks per week) was actually associated with a slightly lower risk of erectile problems compared to not drinking at all. But once consumption climbs well above that threshold, the risk starts to increase. In the short term, even a few drinks too many on a given night can make it difficult to stay hard by depressing nervous system signals and impairing blood flow.
Poor sleep matters more than most people realize. Sleep deprivation lowers testosterone, increases cortisol (a stress hormone), and disrupts the parasympathetic nervous system activity needed for erections. Chronic sleep debt from untreated sleep apnea is a particularly common and overlooked contributor.
Pelvic Floor Weakness
The muscles at the base of the pelvis play a direct role in trapping blood inside the penis during an erection. When these muscles are weak, blood can leak out faster than it flows in, causing erections to fade during sex even when arousal and blood flow are otherwise normal. This is called venous leak, and it’s more common than many people think.
Pelvic floor exercises (often called Kegels) can help. A systematic review of ten clinical trials found that pelvic floor muscle training improved erectile function across every study examined. The exercises involve repeatedly contracting and releasing the muscles you’d use to stop urinating midstream. Results typically take several weeks of consistent daily practice to become noticeable, and no single optimal routine has been established, but the evidence for benefit is consistent.
What Treatment Looks Like
For many men, the fix involves addressing the underlying cause rather than jumping straight to medication. Reducing stress, improving sleep, exercising regularly, quitting smoking, and cutting back on alcohol can all make a meaningful difference, especially when multiple factors are contributing.
When those changes aren’t enough, oral medications that enhance nitric oxide signaling are the most common medical treatment. These drugs work by blocking the enzyme that breaks down the chemical responsible for keeping smooth muscle relaxed. They don’t create arousal on their own; they make it easier for natural arousal to produce and maintain a firm erection. In pooled clinical trial data from over 3,200 men, success rates for completing intercourse reached 82% to 86% among those who responded well on their first attempt.
For anxiety-driven erectile issues, therapy that addresses the psychological pattern is often more effective than medication alone. Cognitive behavioral therapy and sex therapy can break the worry-loss-more worry cycle. Couples therapy can help when relationship tension is feeding into the problem. Many men find that a combination of short-term medication use (to rebuild confidence) and therapy (to address the underlying anxiety) works better than either approach on its own.
When It Points to Something Bigger
Erectile difficulty in men under 50 with no obvious psychological cause deserves medical attention, not because it’s necessarily dangerous on its own, but because it can signal developing cardiovascular disease. The arteries supplying the penis are smaller than those feeding the heart, so they tend to show damage earlier. A man in his 30s or 40s who gradually loses the ability to stay hard may be seeing the first sign of arterial disease that could affect his heart within a few years.
A basic workup typically includes checking blood pressure, blood sugar, cholesterol, and testosterone levels. These are simple, routine tests that can either identify a treatable cause or provide reassurance that the issue is more situational than structural.

