Difficulty getting or staying hard happens when not enough blood flows into the penis, when blood drains out too quickly, or when the nerve signals that trigger the process get disrupted. It’s extremely common, affecting roughly half of men over 40 to some degree, and it can stem from physical causes, psychological ones, or both at the same time. Understanding which category yours falls into is the first step toward fixing it.
How Erections Actually Work
An erection is essentially a hydraulic event. When you’re sexually aroused, nerve signals trigger the release of nitric oxide in the penile tissue. That nitric oxide kicks off a chemical chain reaction that relaxes the smooth muscle inside the penis, allowing small arteries called helicine arteries to open wide. Blood rushes in, fills two spongy chambers (the corpora cavernosa), and the expanding tissue compresses the veins that would normally drain blood away. The result is a firm erection that holds as long as the chemical signals remain active.
Anything that interferes with nerve signaling, nitric oxide production, blood vessel flexibility, or hormonal balance can break this chain at different points. That’s why so many different conditions can cause the same outcome.
Physical Causes: Blood Vessels and Nerves
The most common physical cause is poor blood vessel health. When cholesterol builds up in artery walls and the vessels lose their ability to dilate properly, less blood reaches the penis during arousal. Because penile arteries are smaller than the ones feeding your heart, they tend to clog first. Erectile difficulty often shows up three to five years before a heart attack or stroke, making it one of the earliest warning signs of cardiovascular disease. That timeline matters: it means there’s a real window to address the underlying problem before something worse happens.
Diabetes is another major driver. Sustained high blood sugar damages both nerves and blood vessels over time, and the combination hits erection quality hard. Men with diabetes are significantly more likely to experience erectile problems, and the longer blood sugar stays poorly controlled, the worse the damage tends to get.
Sleep apnea is a less obvious but surprisingly common contributor. Between 50% and 80% of men with obstructive sleep apnea also have erectile problems. The repeated drops in oxygen and fragmented sleep architecture disrupt the hormonal and vascular systems that erections depend on.
How to Tell if It’s Psychological
One of the most useful diagnostic clues is also the simplest: do you still get erections in other contexts? If you wake up hard in the morning, can get erect through masturbation, or have no trouble in some situations but lose it with a partner, the underlying hardware is likely working fine. The issue is more likely psychological.
Psychological erectile difficulty tends to come on suddenly, often linked to a new relationship, a stressful life event, performance anxiety, or depression. You might get an erection initially but lose it quickly. Physical causes, by contrast, usually develop gradually over months or years. The erection slowly becomes less firm, less reliable, but morning erections fade too, and ejaculation typically stays normal.
In practice, the two categories overlap constantly. A man with mild blood flow issues might get anxious about his performance, and that anxiety makes the problem dramatically worse. Breaking the cycle often requires addressing both sides.
Medications That Can Cause It
If your erection problems started around the same time you began a new medication, the drug may be the culprit. Several common medication classes list erectile difficulty as a side effect:
- Blood pressure medications: Thiazide diuretics (water pills) are the most common offenders in this category, followed by beta blockers. Alpha blockers are less likely to cause problems.
- Antidepressants: SSRIs and several other psychiatric medications frequently affect sexual function, sometimes significantly.
- Antihistamines: Certain allergy and heartburn medications can interfere.
- Opioid painkillers: These suppress testosterone and can dampen arousal signals.
- Parkinson’s disease medications and some chemotherapy drugs also carry this risk.
If you suspect a medication is involved, don’t stop taking it on your own. There are often alternative drugs in the same class that carry less sexual side-effect risk, and your prescriber can help you switch.
Testosterone’s Role
Low testosterone gets a lot of attention, but it’s actually not the most common cause of erectile problems. Testosterone plays more of a supporting role: it drives libido and helps maintain the tissue health that erections depend on, but the erection mechanism itself runs primarily on nitric oxide and blood flow. That said, about one in three men evaluated for erectile difficulty does turn out to have testosterone levels below the clinical threshold. If low sex drive accompanies your erection issues, or you’re also experiencing fatigue, loss of muscle mass, or mood changes, testosterone is worth checking with a blood test.
Lifestyle Factors That Make It Worse
Smoking directly damages blood vessel lining and reduces nitric oxide availability, both of which are critical for erections. The good news is that quitting produces measurable improvement. Some men notice better erections within weeks of stopping, and after three to six months of not smoking, many experience significant recovery in erectile function. The longer and heavier you smoked, the longer recovery takes, but the vascular damage is at least partially reversible.
Heavy alcohol use suppresses nerve signaling and lowers testosterone over time. Recreational drugs, particularly cocaine and amphetamines, constrict blood vessels acutely, while chronic marijuana use may blunt arousal pathways. Bodybuilding drugs, especially anabolic steroids, can shut down the body’s natural testosterone production and cause severe erectile problems that persist even after stopping.
Obesity, poor diet, and lack of exercise all contribute through the same cardiovascular pathways. Excess body fat also converts testosterone into estrogen, compounding the hormonal issue. Regular aerobic exercise is one of the most effective non-drug interventions: it improves blood vessel function, raises nitric oxide production, and can improve erection quality even without other changes.
What the Pattern Tells You
Pay attention to the details of what’s happening, because they point toward different causes. A gradual decline over months or years, especially with fading morning erections, suggests a physical issue like blood vessel disease or nerve damage. A sudden change, particularly one tied to a new relationship, stress, or life upheaval, points toward a psychological component. Problems that appeared after starting a medication have an obvious potential fix. And difficulty that comes with low desire, fatigue, or mood changes raises the question of hormonal changes.
Most men don’t need extensive testing to get a clear picture. A basic evaluation typically involves a conversation about the pattern of symptoms, a blood pressure check, blood sugar and cholesterol levels, and sometimes a testosterone level. The severity can be roughly scored on a standardized five-question scale, where scores of 22 to 25 indicate normal function, 17 to 21 suggest mild difficulty, and anything below 16 points to moderate or severe issues that benefit from active treatment.
Why It Matters Beyond Sex
Erectile difficulty is worth taking seriously not just for your sex life but for your overall health. Because erection problems often reflect the state of your blood vessels throughout your body, they can be the first detectable sign of cardiovascular disease, diabetes, or hormonal imbalance. Men who develop erectile difficulty in their 40s or 50s and dismiss it as “just aging” sometimes miss a chance to catch and treat conditions that carry real long-term risk. The three-to-five-year lead time before a potential cardiac event is a genuine opportunity, not a reason to panic, but a reason to get the basics checked.

