Losing an erection during sex is one of the most common sexual health issues men experience, and it rarely points to a single cause. Erections depend on a chain of events: arousal signals from the brain, relaxed blood vessels that allow blood to flow in, and a physical trapping mechanism that keeps blood inside the penis. A break anywhere in that chain can make it difficult to stay hard, even if getting hard initially isn’t a problem.
How Stress and Anxiety Interrupt Erections
The most common reason younger men lose erections during sex is psychological. Your nervous system has two competing modes: one that handles relaxation and arousal, and one that handles perceived threats. When the threat-response system activates, it speeds up your heart rate, deepens your breathing, and shuts down functions the body considers nonessential for survival. Erections fall squarely into that “nonessential” category.
This is why performance anxiety is so effective at killing an erection. The moment you start worrying about losing it, your brain interprets that worry as a low-grade threat. Adrenaline rises, blood vessels constrict, and the erection fades. That creates a feedback loop: you lose your erection once, worry about it happening again next time, and the worry itself becomes the cause. Stress from work, relationship tension, financial pressure, or depression can all trigger the same response, even when you’re not consciously thinking about those things during sex.
One useful clue is whether you still get firm erections in other contexts. If you wake up with morning erections or can maintain hardness during masturbation but lose it with a partner, the cause is almost certainly psychological rather than physical.
Blood Flow and Vascular Problems
Erections are ultimately a blood flow event. The penis fills with blood, and small valves compress to trap that blood inside. If the blood vessels supplying the penis are damaged or narrowed, you may get a partial erection that doesn’t reach full rigidity, or one that fades quickly.
A condition called venous leak is particularly relevant if your main problem is losing hardness rather than achieving it. In a venous leak, blood flows into the penis normally but drains back out too fast because the trapping mechanism isn’t working properly. In younger men with erectile difficulties, this kind of vascular storage problem is actually one of the more common physical causes.
Diabetes is a major driver of vascular erectile dysfunction. Between 35% and 90% of men with diabetes experience erectile problems, depending on how long they’ve had the disease and how well their blood sugar is controlled. High blood sugar damages the inner lining of blood vessels over time, impairing the signals that tell smooth muscle in the penis to relax and allow blood in.
High blood pressure, high cholesterol, and heart disease all damage blood vessels through similar mechanisms. In fact, difficulty maintaining erections is sometimes the earliest warning sign of cardiovascular disease, appearing years before other symptoms.
How Smoking and Nicotine Affect Erections
Cigarette smoke attacks erectile function from two directions. First, it activates the same stress-response system that anxiety does, raising adrenaline levels and constricting blood vessels throughout the body, including the penis. Second, it damages the inner lining of blood vessels over time, reducing the production of nitric oxide, the key chemical signal that relaxes penile tissue and allows blood to flow in.
This means smoking hurts erections both immediately (through vasoconstriction each time you smoke) and long-term (through cumulative vascular damage). Vaping delivers nicotine without combustion byproducts but still triggers the adrenaline and blood pressure effects. Quitting is one of the most effective single changes you can make for erectile function.
Medications That Interfere
Several common medications can make it harder to stay hard. Antidepressants in the SSRI class can reduce arousal, make it difficult to sustain an erection, and delay or prevent orgasm. These effects are well-documented and affect a significant percentage of people taking them. If you suspect your medication is the issue, alternatives with fewer sexual side effects exist, including certain antidepressants that work through different brain pathways.
Blood pressure medications, particularly beta-blockers, can also interfere with erections by reducing blood flow or dampening arousal signals. Opioid painkillers, some prostate medications, and certain anti-anxiety drugs round out the list of common culprits. The pattern to watch for is erection problems that started shortly after beginning a new medication or changing your dose.
Low Testosterone
Testosterone plays a supporting role in erections by fueling sex drive and helping maintain the vascular health of penile tissue. The American Urological Association defines low testosterone as a total level below 300 ng/dL, with a target range of 450 to 600 ng/dL for treatment.
Low testosterone alone rarely causes complete erectile failure, but it can reduce your desire for sex and make it harder to maintain arousal once you’re engaged. If you’ve noticed a drop in libido alongside erection problems, along with fatigue, mood changes, or loss of muscle mass, low testosterone is worth investigating through a simple blood test.
The Role of Pelvic Floor Muscles
Most men don’t realize that specific muscles at the base of the penis play an active role in maintaining erection rigidity. The ischiocavernosus muscles, which wrap around the base of each erectile chamber, contract during arousal to increase internal pressure and keep the penis rigid. Another set of muscles compresses the vein that drains blood from the penis, helping to trap blood inside.
When these muscles are weak, erections can feel less firm or fade more easily, particularly during position changes or transitions during sex. Pelvic floor exercises (the same type of contraction used to stop the flow of urine midstream) have been shown to improve erectile rigidity when practiced consistently. These exercises are free, private, and have no side effects, making them worth trying regardless of the underlying cause.
What Treatment Looks Like
Oral medications that enhance blood flow to the penis are the standard first-line treatment. They work by amplifying the natural erection process, meaning you still need arousal for them to be effective. These medications help about 60% to 70% of men, but up to 40% don’t get a satisfactory response, particularly if the underlying cause is severe vascular damage or nerve injury.
For psychological causes, the medication can break the anxiety cycle by giving you confidence that the erection will hold, which in turn reduces the performance anxiety that was causing the problem. Some men use medication temporarily while addressing the root cause through therapy or stress reduction, then stop once the pattern is broken.
When medications don’t work, options include vacuum devices that draw blood into the penis mechanically, injectable medications delivered directly to the erectile tissue, and in more severe cases, surgical implants. The path forward depends on what’s causing the problem, which is why identifying the cause matters more than jumping straight to treatment.
Narrowing Down Your Cause
A few patterns can help you sort out what’s going on before you see anyone about it. If you get strong morning erections or can stay hard during masturbation but lose it during partnered sex, anxiety or relationship dynamics are the likely driver. If erections have been gradually declining over months or years alongside risk factors like smoking, weight gain, or diabetes, the cause is more likely vascular. If the problem started abruptly after a new medication, that medication is the obvious suspect.
Age matters but less than most men assume. While erectile difficulties become more common after 40, they are not an inevitable part of aging. The conditions that increase with age (cardiovascular disease, diabetes, medication use) are what actually drive the increase, and most of those are treatable or modifiable. Men in their 20s and 30s who struggle to stay hard are more commonly dealing with anxiety, pornography-related desensitization, or unrecognized vascular issues than with any age-related decline.