Maintaining a firm erection depends on healthy blood flow, the right nerve signals, and a calm mental state working together. When any one of those three factors is off, erections suffer. The good news: most of the causes are modifiable, and the fixes range from simple lifestyle changes to targeted exercises to medical options that work for the majority of men.
How Erections Actually Work
Understanding the basic mechanics helps explain why certain fixes work. An erection starts when nerve signals trigger the release of a chemical messenger called nitric oxide inside the penis. Nitric oxide causes the smooth muscle lining the two spongy chambers (the corpora cavernosa) to relax and widen, allowing a several-fold increase in blood flow. As those chambers fill and expand, they compress the veins that would normally drain blood away. That compression traps the blood inside, creating rigidity.
Anything that interferes with nitric oxide production, blood vessel health, or nerve signaling can make it harder to get or stay hard. That’s why erection quality is often called a barometer of cardiovascular health: the same factors that clog arteries elsewhere in the body restrict blood flow to the penis first, because the vessels there are smaller.
Pelvic Floor Exercises
The muscles at the base of your pelvis play a direct role in trapping blood inside the penis during an erection. Strengthening them is one of the most effective non-medical interventions available. In a randomized controlled trial published in the British Journal of General Practice, 40% of men with erectile difficulties regained normal function through pelvic floor training alone, and another 34.5% saw meaningful improvement. Only about a quarter of participants saw no benefit.
The routine is straightforward. In a standing, sitting, or lying position, contract the muscles you’d use to stop the flow of urine. Hold each contraction as strongly as you can without clenching your buttocks, pulling in your stomach, or holding your breath. Perform three maximal contractions in the morning and three in the evening. You can do them standing, sitting in a chair with knees apart, or lying on your back with knees bent. Gradually increase the hold time as the muscles get stronger.
Two additional techniques from the same program are worth noting. While walking, try lifting the pelvic floor to about 50% of your maximum effort. During sex, contracting these muscles rhythmically helps maintain rigidity, and slower thrusting movements generate higher internal pressure in the penis, which helps sustain firmness.
Cardiovascular Exercise
A systematic review of intervention studies found that 40 minutes of moderate-to-vigorous aerobic exercise, four times per week, significantly improves erectile function in men whose difficulties stem from inactivity, obesity, high blood pressure, metabolic syndrome, or cardiovascular disease. That works out to about 160 minutes per week, sustained over at least six months. The exercise should raise your heart rate meaningfully: brisk walking, jogging, cycling, or swimming all qualify. The benefit comes from improved blood vessel function and nitric oxide production, the same mechanism that drives erections in the first place.
Diet and Vascular Health
What you eat directly affects the blood vessels that supply your erections. A Mediterranean-style diet, rich in olive oil, vegetables, fruits, whole grains, nuts, fish, and moderate amounts of wine, is consistently associated with lower risk and severity of erectile problems. The benefits are especially pronounced in men with type 2 diabetes.
The mechanism ties back to nitric oxide. Foods in this pattern increase levels of arginine (a building block your body uses to make nitric oxide) and boost antioxidant defenses that protect blood vessels from damage. Tomatoes deserve special mention: they’re rich in lycopene and other compounds that reduce inflammation in blood vessel walls and improve nitric oxide availability. Extra-virgin olive oil specifically appears to enhance nitric oxide levels in the bloodstream. None of this is a quick fix, but over weeks and months, dietary patterns shape the vascular environment that erections depend on.
Quit Smoking
Smoking damages the lining of blood vessels throughout the body, and the small vessels in the penis are particularly vulnerable. The encouraging finding: vascular improvement begins almost immediately after you stop. In a study using Doppler ultrasound to measure penile blood flow, researchers found significant improvements in venous function within just 24 to 36 hours of quitting. Blood drainage from the penis (which needs to be low during an erection to maintain firmness) improved from 25% of men having normal values while smoking to 85% after stopping. If you smoke and have erection difficulties, quitting is likely the single highest-impact change you can make.
Alcohol: Less Than You’d Think
Contrary to what many men assume, moderate drinking doesn’t appear to hurt erectile function and may even be slightly protective. A dose-response meta-analysis found that men who consumed fewer than 21 drinks per week had a 29% lower risk of erectile dysfunction compared to non-drinkers. Above that threshold, the protective effect disappeared entirely. The issue isn’t your weekly average, though. Acute intoxication suppresses nerve signaling and impairs blood vessel response in real time. If you’re having trouble staying hard after drinking, the simplest fix is having fewer drinks before sex.
Sleep and Testosterone
Poor sleep quietly undermines erection quality through multiple pathways. Obstructive sleep apnea is especially damaging: between 41% and 80% of men with sleep apnea also have erectile dysfunction, depending on the study. Part of the reason involves nighttime erections, which occur during REM sleep. These aren’t just incidental. They deliver oxygen to penile tissue and help maintain the structural health of the erectile chambers. Sleep apnea reduces REM sleep, which reduces these protective erections.
Sleep also governs testosterone production. Most testosterone is produced during sleep, and levels below about 200 ng/dL are associated with noticeably diminished nighttime erections. The clinical threshold for low testosterone is generally around 264 to 275 ng/dL, though labs vary. If you’re consistently sleeping poorly, feeling fatigued, and losing morning erections, a testosterone check is reasonable. That said, erectile dysfunction can occur with perfectly normal testosterone, so low T is just one piece of the puzzle, not the whole picture.
Managing Performance Anxiety
The nervous system has two competing modes: one that promotes erections (parasympathetic) and one that shuts them down (sympathetic, your fight-or-flight response). Anxiety activates the wrong one. If your erections are fine when you’re alone but unreliable with a partner, the cause is almost certainly psychological, and specific techniques can help.
Mindful breathing is the most immediate tool. Slow, deliberate breaths activate the parasympathetic nervous system and counteract the adrenaline response that kills erections. Practice this outside of sexual situations first so it becomes automatic.
Sensate focus is a structured approach used in sex therapy. In the first phase, you and your partner take turns touching each other’s bodies while avoiding the genitals entirely. The goal is to experience pleasure without any pressure to perform. In the second phase, genital touching is included but orgasm is deliberately avoided. This gradually retrains your brain to associate intimacy with relaxation rather than pressure.
The stop-start technique also helps rebuild confidence. Your partner stimulates your penis until you’re erect, then stops until the erection fades, then repeats. Doing this three times in a session teaches your body that losing and regaining an erection is normal, not a failure. Over time, this breaks the anxiety cycle where losing firmness for a moment triggers panic that makes the problem worse.
Medications That Help
PDE5 inhibitors remain the first-line medical treatment for erectile dysfunction regardless of whether testosterone is low or normal. They work by blocking the enzyme that breaks down the chemical messenger responsible for keeping penile smooth muscle relaxed. In practical terms, they make it easier to get and stay hard once you’re aroused. They don’t create arousal on their own.
The four available options differ mainly in timing:
- Sildenafil (Viagra): works within about 30 minutes, lasts 4 to 6 hours, with effects potentially lingering up to 12 hours.
- Tadalafil (Cialis): kicks in within 20 to 30 minutes and lasts 24 to 36 hours, sometimes up to 72. This longer window means less need to plan around a pill.
- Vardenafil (Levitra): has the fastest reported onset at around 10 minutes, with a 5 to 7 hour effective window.
- Avanafil (Stendra): roughly 70% of men can have intercourse within 15 minutes of taking it, and it remains effective for over 6 hours.
All four should be taken on an empty or light stomach for best results (high-fat meals delay absorption). They’re effective for most men, but they work best alongside the lifestyle factors above. A medication can compensate for impaired blood flow, but it works better when your vessels, hormones, and nervous system are functioning well on their own.

