Losing your erection during sex is common, and it almost always has an identifiable cause. Between 5% and 10% of men under 40 experience erectile difficulties, and that number climbs steadily with age, reaching about 49% for moderate to complete erectile dysfunction by age 70. The cause can be physical, psychological, or a combination of both, and understanding the mechanism behind erections makes it much easier to pinpoint what’s going wrong.
How Erections Actually Work
An erection isn’t just about blood flowing in. It’s about blood flowing in and then getting trapped. When you’re aroused, your nervous system releases a chemical signal that relaxes the smooth muscle inside the penis and widens the arteries feeding it. Blood rushes into spongy chambers called the corpora cavernosa, and as those chambers expand, they physically compress the veins that would normally drain blood back out. That compression is what keeps the penis rigid.
Anything that disrupts this chain, whether it’s reduced blood flow in, poor smooth muscle relaxation, or blood leaking back out too quickly, can cause you to lose hardness during sex. The process depends on healthy blood vessels, functioning nerves, the right hormones, and a nervous system that isn’t in overdrive from stress.
Performance Anxiety and the Stress Response
For younger men especially, the most common culprit is psychological. Anxiety triggers a fight-or-flight response, flooding your body with adrenaline and noradrenaline. Those stress hormones constrict blood vessels in the penis, directly opposing the relaxation needed to maintain an erection. Anxiety also reduces the release of nitric oxide, the key molecule that tells penile smooth muscle to relax and let blood in. So even if nothing is physically wrong with you, a worried mind can shut the whole process down.
This creates a frustrating cycle. You lose your erection once, then worry about it happening again, which makes it more likely to happen again. The anxiety doesn’t have to be about sex specifically. Stress from work, relationships, finances, or general mental health can all keep your sympathetic nervous system running too hot for erections to hold.
Blood Vessel and Nerve Damage
Erection problems are often an early warning sign of cardiovascular disease. The arteries supplying the penis are smaller than those feeding the heart, so they tend to show damage first. Conditions like high blood pressure, high cholesterol, and atherosclerosis all reduce blood flow by stiffening or narrowing those vessels.
Diabetes is a particularly significant risk factor. Prolonged high blood sugar damages both nerves and blood vessels over time, which hits erections from two directions: less nerve signaling to trigger arousal, and less blood flow to sustain it. Diabetes also reduces nitric oxide production, weakening the relaxation response that makes erections possible in the first place.
A less well-known physical cause is venous leak, where the veins in the penis don’t compress properly and blood drains out too fast. You might get hard initially but lose it quickly. This can result from structural changes in the tissue that lines the inner chambers of the penis, making it unable to expand enough to seal off the veins. Venous leak is typically diagnosed with an ultrasound that measures blood flow in the penis.
Low Testosterone
Testosterone plays a supporting role in erections, primarily by driving your sex drive. The clinical threshold for low testosterone is below 300 nanograms per deciliter, confirmed by two blood draws taken in the early morning on separate days. Low testosterone on its own doesn’t always cause erection problems directly, but it frequently shows up alongside conditions that do, like obesity and diabetes. Men with low testosterone who receive treatment often report improved nocturnal erections and an easier time getting hard, though results vary depending on what else is going on.
If your desire for sex has dropped noticeably alongside your erection difficulties, low testosterone is worth investigating. If your desire is fine but you’re losing rigidity mid-act, the issue is more likely vascular or psychological.
Medications That Interfere
Several common prescription drugs can make it harder to stay erect. The most frequent offenders include:
- Blood pressure medications: Thiazide diuretics (water pills) are the most common cause, followed by beta-blockers. Alpha blockers tend to cause fewer problems.
- Antidepressants: SSRIs and older tricyclic antidepressants are well known for dampening sexual function, including erection quality.
- Anti-anxiety medications: Benzodiazepines can interfere with arousal.
- Opioid painkillers: Both prescription opioids and recreational use suppress sexual function.
- Antihistamines: Some allergy and heartburn medications can contribute.
If your erection problems started around the same time you began a new medication, that connection is worth exploring with your prescriber. Switching to a different drug in the same class often resolves the issue.
Alcohol, Smoking, and Recreational Drugs
Alcohol is a double hit. It widens blood vessels throughout the body, which drops blood pressure and makes it harder for blood to stay trapped in the penis. It also dulls nerve sensitivity, reducing the physical arousal signals your body needs. Heavy long-term drinking can cause vitamin deficiencies that damage the nerves responsible for penile sensation.
Smoking damages blood vessel walls over time, reducing their ability to dilate on demand. This is one of the more clearly dose-dependent relationships: the more you smoke and the longer you’ve smoked, the worse the effect on erections. Quitting leads to measurable improvements in vascular function. Marijuana, cocaine, amphetamines, and heroin all appear on the list of substances linked to erectile problems as well.
Pornography and Arousal Conditioning
If you can get and stay hard while watching pornography but struggle during sex with a partner, the issue may be how your brain has learned to respond to sexual stimulation. Pornography delivers a high-intensity, controllable dopamine hit. Over time, repeated exposure can reduce sensitivity to natural rewards, meaning real-life intimacy, with its unpredictability and vulnerability, feels less stimulating by comparison.
Some men find they need increasingly novel or extreme material to feel the same arousal, which widens the gap between what works on screen and what works in person. This pattern tends to develop gradually, particularly in men who began using pornography frequently at a young age. Reducing or eliminating pornography use for a sustained period often helps restore arousal sensitivity during partnered sex, though it can take weeks to months.
Figuring Out What’s Causing It
A useful clue is whether you still get erections in other contexts. If you wake up with morning erections or can maintain hardness during masturbation but lose it during partnered sex, the cause is more likely psychological or related to arousal conditioning. If erections are weak or absent across the board, a physical cause is more probable.
Occasional difficulty staying hard is normal and doesn’t require medical attention. The clinical definition of erectile dysfunction is a consistent inability to obtain or maintain an erection adequate for intercourse, lasting longer than three months. If you’re in that territory, a medical evaluation typically starts with blood work to check testosterone, blood sugar, and cholesterol, along with questions about your medications, stress levels, and lifestyle habits. A penile ultrasound can assess blood flow if a vascular cause is suspected.
Most causes of erection loss during sex are treatable. Addressing the underlying factor, whether that’s managing anxiety, improving cardiovascular health, adjusting a medication, or changing a habit, tends to produce better long-term results than jumping straight to erection medications, though those can help bridge the gap while you work on the root cause.