What Causes a Man Not to Get or Keep an Erection?

Erectile dysfunction has many possible causes, from heart health and diabetes to stress, medications, and sleep problems. Here’s what the science says.

Erections depend on a chain of events that starts in the brain and ends with blood filling the spongy tissue inside the penis. A break anywhere in that chain can make getting or keeping an erection difficult or impossible. The causes range from blood vessel damage and nerve injuries to hormone shifts, medication side effects, and psychological stress, and most men with persistent trouble have more than one factor at work. Understanding which links in the chain are weakest is the first step toward fixing the problem.

How an Erection Actually Works

The penis contains two cylinders of spongy tissue called the corpora cavernosa. When a man becomes aroused, nerve signals trigger the release of nitric oxide from nerve endings and the cells lining blood vessels inside these cylinders. Nitric oxide sets off a chemical relay that relaxes the smooth muscle wrapped around the small arteries and spongy spaces, allowing blood to rush in. As the tissue fills, it compresses the veins that normally drain blood away, trapping it inside and producing rigidity. When any step in this process falters, whether the arteries do not open wide enough, the smooth muscle does not relax, or the veins leak, the erection either never forms or fades too quickly.

Blood Vessel Problems Are the Most Common Physical Cause

Anything that narrows arteries or stiffens blood vessel walls can starve the penis of the blood flow it needs. High blood pressure, high cholesterol, and atherosclerosis all damage the inner lining of blood vessels, reducing the availability of nitric oxide and making it harder for smooth muscle to relax. Because the arteries feeding the penis are quite small compared with the ones supplying the heart, the same degree of vessel damage shows up in erections before it shows up as chest pain or a heart attack. A systematic review in European Urology framed erectile difficulty as a potential early warning sign of broader cardiovascular trouble, noting that the penile arteries’ small caliber makes them more sensitive to the same endothelial dysfunction that eventually affects coronary circulation.

This connection matters practically: if you develop erectile problems and have no obvious psychological explanation, it is worth getting your blood pressure, cholesterol, and blood sugar checked. Treating the cardiovascular risk factors can improve erections and may also reduce your risk of a future heart event.

Diabetes Hits Multiple Systems at Once

Erectile difficulty affects up to three-quarters of men with diabetes, making it one of the most strongly linked conditions. The reason the rate is so high is that diabetes does not attack just one part of the erection pathway. Chronically elevated blood sugar damages the lining of blood vessels, generates harmful oxygen-containing molecules that degrade nitric oxide before it can do its job, and injures the small nerves that carry arousal signals to the penis. High glucose also impairs the body’s ability to repair damaged blood vessels, so the problem compounds over time.

Men with diabetes who keep blood sugar well controlled tend to preserve erectile function longer than those with poorly managed levels, though diabetes-related erectile difficulty can still develop even with good control because the damage is cumulative.

Nerve Damage and Neurological Conditions

Erection is a reflex that depends on intact nerve pathways from the brain down through the spinal cord and out to the pelvis. Conditions that interrupt those pathways, including multiple sclerosis, spinal cord injury, and Parkinson’s disease, frequently cause erectile problems. The type and severity of the problem depend on where in the pathway the damage occurs. A spinal cord injury high on the spine may spare reflex erections triggered by touch but eliminate erections triggered by mental arousal, while a lower injury may do the opposite.

Pelvic surgery is another major source of nerve damage. Radical prostatectomy for prostate cancer can injure the cavernous nerves that run alongside the prostate, and even with nerve-sparing surgical techniques, many men experience at least temporary erectile difficulty afterward. Recovery can take months to years, and some degree of lasting change is common.

Testosterone and Hormonal Shifts

Testosterone does not flip a simple on-off switch for erections, but it plays a supporting role at nearly every level of the process. It influences sexual desire, which initiates the brain signals that start the erection reflex. It also helps maintain the health of smooth muscle and endothelial cells inside the corpora cavernosa. When testosterone drops significantly, as in clinical hypogonadism, erections can weaken and desire can fade.

Testosterone replacement in men with genuinely low levels has been shown to improve erections and even rescue the response to PDE5 inhibitor pills in men who previously did not respond to them. However, testosterone is not a cure-all. If blood levels are in the normal range, adding more does not help and carries its own risks. The hormone is also not the sole driver of erections; plenty of men with low-normal testosterone have no erectile issues, and plenty with solid levels do.

Psychological and Emotional Causes

The brain is the organ where arousal starts, so mental health conditions can sabotage erections before any physical process even begins. Performance anxiety is the classic example: worry about whether you will get hard enough triggers a stress response that constricts blood vessels and floods the body with adrenaline, which directly opposes the relaxation needed for an erection. Depression, chronic stress, and relationship conflict all work through similar pathways.

The tricky part is that psychological and physical causes rarely exist in isolation. A man who has one bad night because of a vascular issue may develop performance anxiety that makes the next encounter worse, creating a self-reinforcing cycle. Teasing apart what started the problem and what is maintaining it often requires an honest conversation with a clinician and sometimes a referral for therapy alongside any medical treatment.

Medications That Can Interfere

A long list of prescription drugs can cause or worsen erectile problems. Blood pressure medications are among the most commonly implicated. A Mendelian randomization study found that drugs acting on the renin-angiotensin system, calcium channel blockers, and beta-blockers were all associated with higher odds of erectile difficulty. Antidepressants, particularly SSRIs, are also well-known culprits; they can blunt desire, delay orgasm, and impair erections. Even common over-the-counter anti-inflammatory drugs and certain antacids have been linked to erectile changes.

If you suspect a medication is the cause, do not stop taking it on your own. Abruptly dropping a blood pressure or psychiatric drug can be dangerous. Talk to the prescribing doctor; often there is an alternative drug in the same class with fewer sexual side effects, or the dose can be adjusted.

Lifestyle Factors You Can Change

Smoking, excess body weight, poor diet, and a sedentary routine all independently raise the risk of erectile trouble, and they tend to cluster together. Smoking damages blood vessels directly and accelerates atherosclerosis. Obesity promotes chronic low-grade inflammation that erodes nitric oxide availability. A cross-sectional study found that body mass index was the strongest lifestyle predictor of severe erectile difficulty, and smoking was independently associated with worsening severity as well.

The encouraging flip side is that these risk factors are modifiable. Quitting smoking, losing weight, increasing physical activity, and improving diet have all been associated with better erectile function. Exercise in particular seems to work by improving endothelial health, the same mechanism that keeps coronary arteries flexible. Even modest weight loss can make a noticeable difference for men whose erectile problems are tied to metabolic health.

Recreational Drugs and Heavy Alcohol Use

Chronic substance use takes a toll on erectile function through multiple routes: hormonal disruption, reduced blood flow, liver damage, and direct effects on nerve signaling. In one study of over 700 men who used illicit drugs, more than a third reported erectile difficulty. Heroin users had roughly five times the odds of having the problem compared with non-users, and amphetamine users had about three times the odds.

Alcohol is more nuanced. A drink or two may lower inhibitions and reduce performance anxiety, but heavy or chronic drinking damages nerves, suppresses testosterone production, and harms the liver in ways that compound over time. The line between “helpful” and “harmful” is lower than many men assume.

Sleep Apnea and Nocturnal Oxygen Drops

Obstructive sleep apnea, where the airway repeatedly collapses during sleep, is linked to erectile problems through a mechanism that many men would not expect. Each time breathing stops, oxygen levels dip. These repeated episodes of low oxygen drive inflammation, damage blood vessel linings, and suppress circulating nitric oxide, the same molecule that drives erections. Research has found that the average overnight blood oxygen level is an independent predictor of erectile and sexual difficulty, regardless of other known risk factors like obesity or age.

Treating sleep apnea with a continuous positive airway pressure (CPAP) machine has been shown to improve erectile function scores and nocturnal erection rigidity in a meta-analysis. If you snore heavily, feel unrested despite a full night’s sleep, and also struggle with erections, a sleep study may uncover a treatable root cause that has nothing to do with the usual suspects.

Aging and the Slow Loss of Smooth Muscle

Getting older does not automatically mean losing erections, but it does shift the odds. The spongy tissue that fills with blood gradually loses smooth muscle cells over the decades. When roughly 15 percent of those cells have degraded, the tissue can no longer trap blood effectively, and erections become softer or harder to maintain. This is a distinct process from arterial disease; even a man with clean arteries will eventually see some decline as the cellular makeup of the corpora cavernosa changes.

The rate of this loss varies enormously from person to person and is influenced by all the factors discussed above: vascular health, blood sugar control, hormone levels, exercise habits, and smoking history. Aging accelerates the problem, but it does not cause it in a vacuum.

Pelvic Floor Strength

The muscles at the base of the pelvis play a less-appreciated role in maintaining an erection. During arousal, two specific muscles, the bulbocavernosus and the ischiocavernosus, contract to boost pressure inside the filled corpora cavernosa, helping the penis go from partially firm to fully rigid. Weak pelvic floor muscles have been hypothesized to contribute to erectile difficulty, and a randomized controlled trial found that pelvic floor exercises improved erectile function in men who performed them consistently.

Pelvic floor training is not a standalone fix for most cases, but it is free, has no side effects, and may be a useful addition to other treatments, particularly for men who have undergone prostate surgery or who notice that their erections lose rigidity during intercourse rather than failing to start at all.

Structural Problems Inside the Penis

Peyronie’s disease, a condition where scar tissue forms inside the penis and creates a noticeable curve, can contribute to erectile difficulty through two mechanisms. The scar plaque itself can prevent the spongy tissue from expanding fully, and the structural distortion can impair the normal vein-trapping process that maintains rigidity. Duplex ultrasound studies of men with Peyronie’s have found both impaired arterial inflow and vein leakage contributing to their problems.

How Doctors Figure Out What Is Going On

The evaluation typically starts with a detailed sexual and medical history, a physical exam, and basic blood work covering blood sugar, cholesterol, and hormone levels. In many cases that is enough to identify the likely contributors and start treatment. More specialized tests, like penile Doppler ultrasound to assess blood flow, or overnight monitoring of erections during sleep, are reserved for cases where the picture is unclear or surgery is being considered.

One of the more useful clinical clues is whether the problem is situational. A man who gets normal erections during sleep or with masturbation but not with a partner likely has a significant psychological component. Conversely, a man who never gets firm erections under any circumstances is more likely dealing with a physical issue. A questionnaire-based approach to separating these categories correctly classified the cause about three-quarters of the time in one study, underscoring that a good interview can do a lot before expensive testing comes into play.

Emerging Research Areas

Gut microbiome research has begun poking into erectile function. The idea is that an imbalanced community of gut bacteria can increase system-wide inflammation, disrupt hormone metabolism, and alter neurotransmitter production, all of which feed into the same endothelial and nerve pathways that underpin erections. The research is early-stage and has not yet produced any microbiome-targeted treatments for erectile problems, but it is a window into how interconnected the body’s systems really are.

Environmental chemicals are another frontier. Animal studies have shown that exposure to estrogen-mimicking compounds found in some plastics and industrial waste can directly alter how penile smooth muscle contracts and relaxes, shifting the balance toward constriction. One study found that exposure to the synthetic estrogen diethylstilbestrol through drinking water significantly impaired the relaxation response in erectile tissue and increased sensitivity to a vessel-constricting signal. Translating animal findings to humans is always uncertain, but the research raises questions about long-term environmental exposures that most men would never think to connect to bedroom difficulties.