Difficulty getting hard is one of the most common sexual health issues men experience, and it has a wide range of causes, from temporary stress to underlying health conditions. About 26% of men under 40 report erection problems in some surveys, and roughly 52% of men between 40 and 70 experience some degree of erectile difficulty. If this is happening to you, you’re far from alone, and understanding the mechanics behind it can help you figure out what’s going on.
How Erections Actually Work
An erection depends on a precise chain of events. It starts with a signal from your nervous system, which triggers the smooth muscle tissue inside the penis to relax. When that muscle relaxes, small arteries open up and blood floods into a network of spongy chambers called the corpora cavernosa. As those chambers fill and expand, they compress the veins that would normally drain blood out, trapping it inside and creating rigidity.
For most of the day, your body actively keeps the penis soft. The sympathetic nervous system, the same branch that controls your fight-or-flight response, keeps those blood vessels constricted and blood flow minimal. Getting hard requires your body to shift out of that constricted state and into a relaxed, dilated one. A chemical called nitric oxide is the key player in that shift. Anything that reduces nitric oxide availability or keeps your sympathetic nervous system firing can block the process.
Stress and Anxiety Are Common Culprits
Your brain is the starting point for arousal, which means your mental state has enormous influence over whether an erection happens. The sympathetic nervous system, the one that keeps the penis flaccid, ramps up when you’re stressed, anxious, or distracted. Performance anxiety is a textbook example: worrying about whether you’ll get hard floods your body with the exact signals that prevent it from happening.
There’s a useful clue here. During REM sleep, the sympathetic nervous system largely shuts down. That’s why most men get erections overnight, typically three to five per night, whether they’re having sexual dreams or not. If you wake up with morning erections or notice them during the night but can’t get hard during sex, that’s a strong signal the issue is psychological rather than physical. Your body is proving it can do the job when your brain isn’t getting in the way.
Depression, relationship tension, work stress, and even general fatigue can all suppress arousal enough to cause problems. These causes tend to come on suddenly rather than gradually, and they’re often situational, meaning erections work fine in some contexts but not others.
Blood Flow Problems
Because erections are fundamentally a blood flow event, anything that damages your blood vessels can make them harder to achieve. The arteries in the penis are smaller than those feeding the heart, so they tend to show damage earlier. This is why erectile difficulty sometimes serves as an early warning sign for cardiovascular disease, potentially appearing years before a heart attack or stroke would occur. A study in Circulation found that men with erectile dysfunction had significantly higher rates of cardiovascular events over a follow-up period of about four years.
High blood pressure, high cholesterol, and smoking all damage the inner lining of blood vessels, reducing their ability to dilate and deliver blood. Obesity contributes through chronic inflammation, which also impairs blood vessel function. These causes tend to develop gradually. You might notice erections becoming less firm over months or years rather than disappearing overnight.
Diabetes and Nerve Damage
Diabetes deserves its own mention because it attacks erections from two directions. Sustained high blood sugar damages both the small blood vessels that supply the penis and the nerves that trigger the erection process. Without intact nerve signaling, the relaxation cascade never starts properly, and without healthy blood vessels, there’s not enough flow to fill the chambers even when the signal gets through. Men with diabetes are significantly more likely to develop erectile problems, and those problems tend to appear at younger ages.
Medications That Interfere
A number of common prescription drugs can make it harder to get or stay hard. The most frequent offenders fall into two categories.
- Blood pressure medications: Thiazide diuretics (water pills) are the most common blood pressure drugs to cause erection problems. Beta-blockers are the next most likely. These medications lower blood pressure system-wide, which can reduce the pressure needed to fill the penile chambers.
- Antidepressants and anti-anxiety medications: SSRIs like fluoxetine and sertraline are well known for blunting sexual function. Older antidepressants, benzodiazepines for anxiety, and antipsychotic medications can also interfere. These drugs alter the neurotransmitter balance involved in arousal.
If your erection problems started around the same time you began a new medication, that timing is worth noting. Don’t stop taking prescribed medication on your own, but it’s a conversation worth having with whoever prescribed it, since alternative drugs in the same class sometimes cause fewer sexual side effects.
Hormones and Low Testosterone
Testosterone plays a role in sexual desire and erectile function, though its contribution is more nuanced than many people assume. The American Urological Association defines low testosterone as a total level below 300 nanograms per deciliter. Men with erectile dysfunction do tend to have somewhat lower testosterone levels on average, but the difference is modest, around 47 ng/dL lower than men without problems.
Low testosterone is more likely to show up as reduced sex drive than as a direct inability to get hard. If you’ve noticed that your interest in sex has dropped alongside erection difficulties, and especially if you also have fatigue, loss of muscle mass, or mood changes, hormone levels are worth checking. But for many men with erection problems, testosterone is within normal range and isn’t the issue.
Lifestyle Factors That Add Up
Several everyday habits can quietly erode erectile function over time. Heavy alcohol use is a classic: alcohol is a nervous system depressant that impairs the signaling needed for erections in the short term and damages blood vessels and nerves with chronic use. Smoking directly reduces nitric oxide availability, the molecule your body needs to relax penile blood vessels. Even a few years of smoking can measurably affect erectile quality.
Sleep deprivation suppresses testosterone production and keeps stress hormones elevated. Sedentary behavior contributes to poor cardiovascular health, which circles back to blood flow. Pornography use at high frequency has been reported by some men as creating a disconnect between real-world arousal and erection response, though this is an area where individual experiences vary widely.
What You Can Do
The good news is that many of the most common causes are reversible or manageable. Exercise is one of the most effective interventions, both for improving cardiovascular health and for directly strengthening the muscles involved in erections. Pelvic floor exercises (often called Kegels) have been shown in multiple trials to improve erectile function. These exercises target the muscles at the base of the penis that help trap blood during an erection. There’s no single agreed-upon protocol, but a typical routine involves squeezing those muscles for a few seconds at a time, multiple sets per day, for several weeks before expecting results.
Diet matters too. Research consistently links Mediterranean-style eating, heavy on vegetables, fruits, whole grains, fish, and olive oil, with lower rates of erectile dysfunction. This pattern improves blood vessel health, reduces inflammation, and supports healthy weight, all of which feed directly into erection quality.
Cutting back on alcohol, quitting smoking, improving sleep, and finding ways to manage stress all help. These changes don’t produce overnight results, but over weeks to months, many men notice meaningful improvement. For psychological causes, cognitive behavioral therapy or working with a sex therapist can break the anxiety cycle that keeps the sympathetic nervous system locked in overdrive.
When It Signals Something Bigger
Erection problems that develop gradually, especially in men over 40, can be an early signal of cardiovascular disease. The same plaque buildup and vessel damage that restricts blood flow to the penis will eventually affect larger arteries feeding the heart and brain. Think of it as an early detection system: the smaller pipes clog first. Men who develop unexplained erectile difficulty, particularly if they also have risk factors like high blood pressure, high cholesterol, excess weight, or a family history of heart disease, should treat it as a reason to get their cardiovascular health assessed, not just their sexual function.

