Difficulty maintaining an erection is one of the most common sexual health complaints, and it almost always has an identifiable cause, whether physical, psychological, or a combination of both. The underlying mechanism involves blood flow: an erection depends on blood rushing into the penis and staying trapped there, so anything that disrupts blood vessels, nerves, hormones, or mental arousal can make staying hard difficult. The good news is that most causes are treatable once you know what you’re dealing with.
How an Erection Works, and Where It Breaks Down
An erection is a hydraulic event. Sexual arousal triggers nerves to release signaling molecules, most importantly nitric oxide, which relaxes the smooth muscle tissue inside the two cylindrical chambers of the penis (the corpora cavernosa). As that muscle relaxes, blood rushes in and fills the spongy tissue. The expanding tissue then presses against the veins that would normally drain blood out, trapping it inside. That trapped blood is what keeps you hard.
Problems at any step in this chain can make erections unreliable. If the arteries supplying blood are narrowed by plaque or damaged by high blood pressure, not enough blood gets in. If the smooth muscle inside the penis has lost flexibility due to aging or disease, it can’t relax fully. If the veins don’t compress properly, blood drains out too fast, a condition sometimes called venous leakage, which affects roughly 1 to 2 percent of men under 25 but about 10 to 20 percent of men over 60.1MDPI Diagnostics. MRI-Cavernosography: A New Diagnostic Tool for Erectile Dysfunction Due to Venous Leakage And if the nerves that carry arousal signals are damaged, the whole process may never get started properly.
Blood Vessel and Heart Health
Vascular disease is the single most common physical cause of erectile problems. The arteries supplying the penis are small, so they tend to show damage from atherosclerosis, high blood pressure, and high cholesterol before the larger arteries to the heart do. That’s why erectile dysfunction is increasingly recognized as an early warning sign of cardiovascular disease.
Hypertension is a particularly potent contributor. It reduces the availability of nitric oxide, increases oxidative stress, and promotes vascular thickening, all of which impair the ability of penile blood vessels to dilate on demand.2PubMed Central. Erectile Dysfunction Is a Hallmark of Cardiovascular Disease: Unavoidable Matter of Fact or Opportunity to Improve Men’s Health? If you’re having trouble staying hard and you also have high blood pressure, elevated cholesterol, or a family history of heart disease, those issues are worth investigating together rather than separately. Treating the cardiovascular risk factors sometimes improves erections on its own.
Diabetes and Metabolic Problems
Diabetes does a kind of double damage. Chronically elevated blood sugar injures both blood vessels and nerves, the two systems most critical for erections. Men with diabetes are roughly three and a half times more likely to have erectile dysfunction than men without it.3PubMed Central. Erectile dysfunction and diabetes: A melting pot of circumstances and treatments The longer blood sugar has been poorly controlled, the worse the effect tends to be. Metabolic syndrome, that cluster of belly fat, high blood sugar, high blood pressure, and abnormal cholesterol, carries similar risks even if you haven’t crossed the threshold for a diabetes diagnosis.
Getting blood sugar under control can slow or prevent further damage, but nerve injury from diabetes is often only partially reversible. That’s why early detection matters. If you notice erections getting softer or shorter before you’ve been diagnosed with anything metabolic, it’s worth getting your fasting glucose and hemoglobin A1c checked.
Nerve Damage and Surgical Injury
The nerves that trigger an erection run along the outside of the prostate, which makes prostate surgery a well-known cause of erectile problems. The cavernous nerves are delicate fibers that carry the parasympathetic signals responsible for releasing nitric oxide in the penis.4PubMed Central. Nerve Repair for Erectile Dysfunction After Radical Prostatectomy: A Systematic Review of Outcomes Even with nerve-sparing surgical techniques, some degree of injury is common, and recovery can take months to years.
Surgery isn’t the only culprit. Spinal cord injuries, multiple sclerosis, Parkinson’s disease, and long-standing diabetes can all damage the neural pathways involved. Pelvic fractures and cycling-related nerve compression are less common but real causes, particularly in younger men. Among men under 40 with erectile dysfunction, at least 15 to 20 percent have an organic physical cause rather than a purely psychological one, and neurological problems make up a significant share of those cases.5PubMed Central. Evaluation of young men with organic erectile dysfunction
Medications That Interfere
A long list of prescription drugs can impair erections, and the one most people think of first is antidepressants. SSRIs and SNRIs are well known for causing sexual side effects, which range from reduced desire and difficulty reaching orgasm to trouble getting or maintaining an erection.6PubMed Central. Antidepressant-associated sexual dysfunction: impact, effects, and treatment The reported rates vary widely between studies, partly because patients underreport the problem and partly because clinicians don’t always ask about it.
Blood pressure medications, particularly older beta-blockers and some diuretics, can also contribute. Antiandrogens used for prostate conditions, certain anti-seizure drugs, and opioid pain medications round out the most common offenders. If erectile difficulty started around the same time you began a new medication, that timing is a strong clue. Switching to a different drug within the same class often helps, but never stop a medication without talking to whoever prescribed it.
Smoking and Recreational Substances
Cigarette smoking damages erections through the same nitric oxide pathway that drives the whole process. Nicotine and the toxic compounds in cigarette smoke impair the signaling that tells penile smooth muscle to relax, and the damage appears to be dose-dependent: the more you smoke, the worse the effect.7PubMed Central. Effects of cigarette smoking on erectile dysfunction Quitting does improve erectile quality over time, though recovery depends on how much vascular damage has already accumulated.
Heavy alcohol use is a familiar culprit. A drink or two may reduce inhibition, but more than that depresses the central nervous system and blunts arousal signals. Chronic heavy drinking can cause lasting nerve and liver damage that compounds the problem. Recreational drugs, including cocaine and methamphetamine, can cause acute erectile failure and long-term vascular harm with repeated use. Cannabis has a more mixed picture: some men report increased arousal in small amounts and difficulty maintaining an erection in larger doses, but the research is still inconsistent.
Performance Anxiety and Psychological Causes
The brain is the most important sex organ, which means anxiety, stress, and depression can shut down an erection as effectively as a blocked artery. Performance anxiety is particularly insidious because it creates a feedback loop: you lose your erection once, then the next time you worry about it happening again, and that worry itself prevents the erection. Relationship conflict, body image concerns, and unresolved trauma can all feed into the same cycle.
Multiple therapeutic approaches can break that loop. Cognitive behavioral therapy helps identify and restructure the thought patterns that fuel the anxiety, while mindfulness-based techniques and sensate focus exercises redirect attention away from performance and toward physical sensation.8PubMed Central. Different faces of anxiety in sexual dysfunction: key features, effective interventions, and critical implications for health care professionals—ESSM position statements Couples therapy is especially useful when the issue involves relationship dynamics. Sometimes a short course of an erectile dysfunction medication is used alongside therapy just to rebuild confidence and interrupt the failure cycle, after which many men no longer need the drug.
Pornography Habits and Arousal Patterns
This is a touchy subject, and the research is still evolving, but there is evidence that heavy pornography use can contribute to situational erectile dysfunction, meaning you can get hard watching porn but struggle with a real partner. One international survey found that among men who reported finding pornography more arousing than partnered sex, about 56 percent met criteria for erectile dysfunction, compared with 17 percent of those who found real sex more arousing.9PubMed Central. Associations Between Online Pornography Consumption and Sexual Dysfunction in Young Men: Multivariate Analysis Based on an International Web-Based Survey
Whether pornography is causing the problem or whether men with existing arousal difficulties are more drawn to pornography is not fully settled. What seems clear is that when real sexual encounters consistently feel less stimulating than on-screen content, the mismatch can make maintaining an erection with a partner much harder. If this sounds familiar, reducing or taking a break from pornography while working on partnered intimacy is a low-risk first step.
Sleep Apnea and Poor Sleep
Obstructive sleep apnea is an underappreciated contributor to erectile problems. Repeated oxygen drops during the night damage blood vessels over time and suppress testosterone production. Men with untreated sleep apnea have significantly higher rates of erectile dysfunction. A randomized trial found that consistent use of CPAP (the pressurized mask worn during sleep) improved erectile function, sexual desire, and overall sexual satisfaction in men who adhered to the treatment.10PubMed Central. Randomized Trial of CPAP and Vardenafil on Erectile and Arterial Function in Men With Obstructive Sleep Apnea and Erectile Dysfunction The key word there is “adherent.” Men who used CPAP inconsistently didn’t see the same improvements in erectile function.
Even without sleep apnea, chronic sleep deprivation suppresses testosterone and increases cortisol, both of which work against erections. If you’re routinely sleeping fewer than six hours, fixing that may help more than any supplement or device.
How Aging Changes Penile Tissue
Aging affects erections even in the absence of any specific disease. The smooth muscle and elastic fibers inside the penis gradually decline, replaced by stiffer collagen. Studies of human penile tissue show that the ratio of smooth muscle to collagen shifts with age, making the tissue less compliant and less able to expand fully during arousal.11PubMed. Age-related morphological changes in smooth muscle and collagen content in human corpus cavernosum The tunica albuginea, the tough outer casing that traps blood inside the erection, also thins and loses elasticity over time.12PubMed Central. Reversion of penile fibrosis: Current information and a new horizon
These tissue-level changes explain why erections tend to become less rigid and take longer to achieve as men get older, even when blood flow and nerve function are still reasonably good. It’s a gradual process, not a cliff edge, and it doesn’t mean erections disappear entirely. But it does mean that an older man who also has mild cardiovascular disease or mild nerve damage may cross the threshold into noticeable difficulty sooner than a younger man with the same conditions.
Diet and Exercise
If the underlying cause is vascular, which it usually is, then anything that improves cardiovascular health tends to improve erections. Regular aerobic exercise enhances blood vessel function, lowers blood pressure, and improves insulin sensitivity. Resistance training can support healthy testosterone levels. The combination is often more effective than either alone.
Dietary patterns matter too. A systematic review and meta-analysis found that the Mediterranean diet, rich in olive oil, nuts, fish, and polyphenol-dense fruits and vegetables, is associated with improved sexual function. The mechanism goes beyond general anti-inflammatory effects: these foods directly support nitric oxide production in blood vessel walls, the same signaling molecule that relaxes penile smooth muscle.13PubMed Central. Healthy dietary patterns improve sexual function and incontinence symptoms: systematic review and meta-analysis of dietary patterns and dietary interventions You don’t have to move to the Mediterranean coast. The core idea is more plants, healthy fats, and less processed food.
Pelvic Floor Training
The pelvic floor muscles play a role in maintaining erections that most men are unaware of. The ischiocavernosus and bulbocavernosus muscles contract around the base of the penis and help keep blood trapped inside. If those muscles are weak, blood escapes more easily. A randomized controlled trial had men with erectile dysfunction perform pelvic floor exercises with biofeedback. After six months, 40 percent had regained normal erectile function, and another 35 percent showed meaningful improvement.14PubMed Central. Randomised controlled trial of pelvic floor muscle exercises and manometric biofeedback for erectile dysfunction
Pelvic floor exercises are essentially what people call Kegels, though doing them correctly for erectile function is slightly different from the version typically taught for urinary continence. The key is identifying the right muscles, usually by imagining you’re stopping urine midstream or pulling the base of your penis inward, and then doing structured sets of contractions daily. A pelvic floor physiotherapist can confirm you’re doing them correctly and help design a progression. The approach is especially useful for men whose problem is losing their erection partway through sex, because the issue may be partly muscular rather than purely vascular.
Medications for Erectile Dysfunction
PDE5 inhibitors, the drug class that includes sildenafil (Viagra), tadalafil (Cialis), and vardenafil (Levitra), remain the first-line medical treatment. They work by blocking the enzyme that breaks down the nitric oxide signaling pathway, making it easier for blood to flow into the penis and stay there. They don’t create desire or cause spontaneous erections; you still need sexual stimulation for them to work. Tadalafil’s longer half-life makes it suitable for daily low-dose use, which some men prefer because it removes the need to time a pill before sex.
These medications don’t work for everyone. Men with severe nerve damage or very advanced vascular disease may not respond, and they’re contraindicated for men taking nitrate medications for heart disease. Side effects are generally mild: headache, flushing, nasal congestion, and occasionally visual changes with sildenafil. If PDE5 inhibitors fail or can’t be used, injectable medications delivered directly into the penis (intracavernosal injections) are the typical second-line option. These bypass the nitric oxide pathway entirely and directly relax the smooth muscle, producing erections within minutes.
Devices and Surgical Options
Vacuum erection devices are a non-drug option that works by creating negative pressure around the penis, drawing blood in mechanically. A constriction ring placed at the base then holds the blood in place. They’re clunky and require some practice, but they work reliably for many men and have no systemic side effects. They’re particularly useful for men who can’t take oral medications.
When all else fails, penile prosthesis implantation is considered the definitive surgical treatment. Modern three-piece inflatable prostheses consist of a pump placed in the scrotum, a fluid reservoir behind the abdominal wall, and inflatable cylinders inside the penis. Squeezing the pump transfers fluid into the cylinders, creating a rigid erection on demand. Penile prostheses are reserved as a third-line treatment for men who haven’t responded to medications or other approaches.15PubMed Central. Three-Piece Inflatable Penile Prosthesis Implantation for the Treatment of Severe Erectile Dysfunction Following a Complex Pelvic Fracture: A Case Report They provide a permanent restoration of the ability to have penetrative sex and have high satisfaction rates among men and their partners.16Prosthesis. Discovery of a Three-Piece Inflatable Penile Prosthesis Implant During Donor Dissection: Anatomical Case Study The downside is that the surgery is irreversible. The natural erectile tissue is destroyed to make room for the implant, so if the device were ever removed without replacement, natural erections wouldn’t return.
Shockwave Therapy and Emerging Treatments
Low-intensity extracorporeal shockwave therapy (LI-ESWT) has generated considerable interest as a treatment that might actually repair damaged tissue rather than just work around it. The concept is that applying low-energy acoustic waves to the penis creates controlled microtrauma at the cellular level, stimulating the release of growth factors and the formation of new blood vessels.17PubMed Central. Shockwave treatment of erectile dysfunction Several trials have shown improvements in erectile function scores, particularly in men with mild to moderate vascular-origin dysfunction.
The treatment is still not standardized: protocols vary in the number of sessions, the energy level used, and the areas of the penis targeted. It’s available in many urology clinics but isn’t yet universally endorsed by major medical guidelines as a standard treatment. Other regenerative approaches, including platelet-rich plasma injections and stem cell therapy, are at even earlier stages and should be viewed skeptically until larger controlled trials are completed. Clinics heavily marketing these treatments ahead of the evidence are more common than the data justifies.
When to See a Doctor, and What They’ll Actually Do
If you’ve been having trouble staying hard more often than not over a span of a few months, and it’s bothering you, that’s enough to warrant a visit. There’s no threshold of severity you need to meet first. A standard evaluation involves a medical history focused on cardiovascular risk factors, medication review, mental health screening, and basic blood work including fasting glucose, lipid panel, and testosterone levels. A physical exam checks for penile abnormalities like Peyronie’s plaques (fibrous scar tissue that can affect erections and cause curvature).
Most men don’t need elaborate specialized testing. Nocturnal penile tumescence monitoring, Doppler ultrasound of penile blood flow, and cavernosography (imaging of the venous drainage) are reserved for cases where the diagnosis is unclear after initial workup or when surgery is being considered. For the majority of men, the combination of history, blood tests, and a trial of a PDE5 inhibitor tells the clinician what they need to know. The biggest barrier isn’t diagnostic complexity. It’s the fact that most men wait years to bring up the problem, often until an underlying condition like diabetes or heart disease has progressed further than it needed to.