Difficulty getting hard during sex is one of the most common sexual health issues men experience, affecting over 30% of men between ages 40 and 70, and it’s far from rare in younger men either. The causes range from temporary stress to underlying health conditions, and most of them are treatable once you know what’s going on.
How Erections Work
An erection is a vascular event. When you’re sexually aroused, nerves release a chemical signal called nitric oxide, which triggers a chain reaction that relaxes smooth muscle tissue inside the penis. This relaxation opens up the blood vessels (called helicine arteries), allowing blood to rush into the spongy tissue of the shaft. At the same time, the veins that normally drain blood out get compressed, trapping blood inside and creating rigidity.
Anything that disrupts this process, whether it’s a problem with nerve signaling, blood flow, hormone levels, or the mental state required to initiate arousal, can make it difficult to get or stay hard.
Anxiety and the Fight-or-Flight Response
This is the most common cause in younger men, and it creates a frustrating cycle. When you feel pressure to perform, your brain activates its sympathetic nervous system, the same “fight or flight” response you’d get from a sudden threat. That response actively shuts down bodily functions that aren’t needed to survive, and erections are one of the first things to go. Your body is essentially deciding that sex isn’t a priority right now because it thinks you’re in danger.
The cruel part is that one bad experience can create the anxiety that causes the next one. You worry about not getting hard, which triggers the stress response, which prevents you from getting hard, which makes you worry more next time. This pattern is extremely common and doesn’t mean anything is physically wrong with you. It can happen with a new partner, after a long break from sex, during relationship tension, or during periods of general stress at work or in life.
One useful clue: if you still get erections in the morning or during sleep, the issue is almost certainly psychological rather than physical. It’s normal to have three to five full erections during deep sleep each night. If those are happening, your vascular and nerve systems are working fine, and the problem is situational.
Blood Vessel Problems and Heart Health
For men over 40 especially, erection difficulties often trace back to the blood vessels. The most common physical cause is atherosclerosis, the same buildup of plaque in artery walls that leads to heart attacks and strokes. When arteries can’t dilate properly during arousal, the penis can’t fill with blood.
Here’s something important: because the arteries supplying the penis are smaller than those feeding the heart, they tend to show problems first. Erectile dysfunction often appears three to five years before a heart attack or stroke. This means erection trouble can be an early warning sign of cardiovascular disease, and catching it early gives you time to address the underlying problem through lifestyle changes or medical treatment. If you’re experiencing persistent difficulty and you have risk factors like high blood pressure, high cholesterol, diabetes, or a family history of heart disease, this connection is worth taking seriously.
Medications That Interfere
A long list of common medications can cause or worsen erection problems. If your difficulties started around the same time you began a new prescription, that’s a significant clue.
- Blood pressure medications: Thiazide diuretics (water pills) are the most common culprits, followed by beta blockers. These drugs lower blood pressure system-wide, which can reduce the blood flow needed for an erection.
- Antidepressants and anti-anxiety medications: SSRIs like fluoxetine and sertraline are well known for causing sexual side effects. Benzodiazepines used for anxiety can also contribute.
- Opioid painkillers: Codeine, oxycodone, morphine, and other opioids suppress testosterone and interfere with arousal.
- Antihistamines: Even over-the-counter allergy and heartburn medications like diphenhydramine (Benadryl) and ranitidine can have an effect.
Never stop a prescribed medication without talking to your doctor. In many cases, switching to a different drug in the same class can solve the problem.
Nicotine, Alcohol, and Recreational Drugs
Nicotine is directly damaging to blood vessels. It raises blood pressure, promotes plaque buildup in artery walls, and impairs the vessels’ ability to dilate. A study of over 13,700 men found that daily e-cigarette users were more than twice as likely to experience erectile dysfunction as men who had never vaped. This isn’t just a long-term smoker’s problem; vaping delivers enough nicotine to cause real vascular effects in men as young as their twenties.
Alcohol is a depressant that dulls nerve signaling at higher doses. A drink or two might reduce performance anxiety for some men, but beyond that, alcohol actively works against erections. Chronic heavy drinking can also lower testosterone levels over time. Cocaine, amphetamines, marijuana, and heroin all appear on clinical lists of substances that cause erectile problems through various mechanisms, from constricting blood vessels to disrupting hormone signaling.
Low Testosterone and Hormonal Causes
Testosterone plays a supporting role in erections by maintaining libido and helping regulate the chemical signaling process. Low testosterone alone doesn’t always cause erection problems, but it reduces desire, which makes arousal harder to achieve. If your main symptom is low sex drive rather than a mechanical inability to get hard, hormones are worth investigating. Testosterone levels decline gradually with age, but they can also drop from poor sleep, obesity, chronic stress, or certain medications.
How to Tell if It’s Physical or Psychological
The simplest at-home test is paying attention to your morning erections. If you regularly wake up with an erection, or if you can get hard during masturbation but not with a partner, the cause is almost certainly psychological. Your body is proving it can do the job; the problem is context-specific.
There’s also a more formal version of this called the nocturnal penile tumescence test. A clinical version involves monitoring erections during sleep over two consecutive nights. If full erections occur during sleep, physical causes are largely ruled out.
Physical causes tend to develop gradually over time, with erections becoming progressively less firm. Psychological causes often appear suddenly, are inconsistent (works sometimes, not others), and are tied to specific situations or partners.
When It Becomes a Medical Issue
Having an off night occasionally is completely normal and not a sign of a problem. The clinical definition of erectile dysfunction is a consistent inability to get or maintain an erection adequate for sex, lasting longer than three months. If you’re in that territory, it’s worth getting evaluated, not just because treatments are effective, but because a workup can uncover underlying conditions like cardiovascular disease or diabetes that you’d want to know about early.
For younger men dealing with performance anxiety, cognitive behavioral therapy and mindfulness-based approaches have strong track records. For vascular causes, the same lifestyle changes that protect your heart, regular exercise, quitting nicotine, maintaining a healthy weight, also improve erections. In many cases, these changes alone are enough to reverse the problem.