Getting and staying hard depends on blood flow, nerve signaling, hormones, and mental state all working together. When any one of those factors is off, erections suffer. The good news is that most of the common causes are fixable, and many don’t require medication. About 14% of men under 40 experience some degree of erectile difficulty, and some estimates put that number as high as 35%, so this is far from rare at any age.
What Actually Happens During an Erection
An erection starts in the brain. Sexual arousal triggers nerve signals that release a molecule called nitric oxide into the tissue of the penis. Nitric oxide relaxes the smooth muscle inside the two spongy chambers that run the length of the shaft, allowing blood to rush in and fill them. As those chambers expand, they compress the veins that would normally drain blood away, trapping it inside. That’s what creates rigidity.
Anything that interferes with this chain, whether it’s reduced blood flow from clogged arteries, low nitric oxide production, hormonal changes, or anxiety hijacking the nerve signals, can make it harder to get or keep an erection. The fix depends on where the chain is breaking.
How to Tell If It’s Physical or Mental
One useful clue is whether you still get erections during sleep. Healthy men typically get several erections per night during REM sleep, which is why morning wood happens. If you wake up hard regularly but struggle during sex, the issue is more likely psychological: performance anxiety, stress, or relationship tension. If you rarely wake up with an erection, a physical factor like poor circulation, low testosterone, or a medication side effect is more likely involved. Most men have some combination of both.
Exercise Is the Strongest Natural Fix
Aerobic exercise is the single most effective lifestyle change for improving erections. It boosts nitric oxide production, improves cardiovascular health, reduces stress hormones, and raises testosterone. A systematic review of intervention studies found that 160 minutes per week of moderate-to-vigorous aerobic exercise for six months significantly improved erectile function in men whose difficulties stemmed from inactivity, obesity, high blood pressure, or metabolic issues.
The effective dose in most studies broke down to about 40 minutes of exercise, four times per week. Brisk walking, jogging, cycling, swimming, or any activity that gets your heart rate up counts. Some of the most successful programs mixed moderate effort with short bursts of higher intensity. Men in these studies started seeing measurable changes within a few months, with the average program lasting about six months.
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 through targeted contractions (often called Kegels) can make a real difference. In a randomized controlled trial published in the British Journal of General Practice, 40% of men who did daily pelvic floor exercises for several months regained normal erectile function, and another 34.5% saw meaningful improvement.
The routine is straightforward: squeeze the muscles you’d use to stop the flow of urine, hold for several seconds, then release. Do sets of three contractions while standing, sitting, and lying down, morning and evening. You need to stick with it for at least three months before expecting results, and proper technique matters. If you’re not sure you’re engaging the right muscles, a physical therapist who specializes in pelvic floor work can help.
What You Eat Matters More Than You Think
Erections are a vascular event, so anything that’s good for your blood vessels is good for your erections. A Mediterranean-style diet, heavy on vegetables, fruits, whole grains, nuts, olive oil, and fish, has been directly linked to lower rates of erectile difficulty. Men with the highest adherence to this eating pattern had significantly less ED, and lower severity when it did occur, compared to men with low adherence.
This makes sense biologically. Leafy greens and beets are rich in nitrates, which your body converts into the same nitric oxide that triggers erections. Foods high in flavonoids (berries, citrus, dark chocolate, red wine in moderation) support the health of blood vessel walls. On the flip side, diets high in processed food, sugar, and saturated fat promote inflammation and arterial stiffness, both of which choke off blood flow.
Fix Your Sleep
Poor sleep quietly undermines erections through multiple pathways. Testosterone production peaks during deep sleep, so chronic sleep deprivation directly lowers hormone levels. Men with obstructive sleep apnea, where breathing repeatedly stops during the night, have measurably lower testosterone. When levels drop below a certain threshold, sleep-related erections decrease noticeably.
Sleep apnea also damages blood vessels through repeated drops in oxygen saturation and increases the risk of depression, which compounds erectile problems further. If you snore heavily, wake up tired despite a full night, or your partner has noticed you gasping during sleep, getting evaluated for sleep apnea could be one of the most impactful things you do for your sexual health. Treatment with a breathing device often improves erections as a side benefit.
Managing Performance Anxiety
Anxiety is one of the most common causes of erectile difficulty in younger men, and it creates a vicious cycle: one failed erection leads to worry about the next one, which makes the next one more likely to fail. Your nervous system can’t simultaneously be in fight-or-flight mode and generate an erection. They use opposing branches of the same system.
Cognitive behavioral sex therapy addresses this with several practical techniques. Sensate focus exercises involve physical intimacy with your partner that deliberately excludes intercourse, shifting the goal from “performing” to simply experiencing sensation. The stop-start technique, where stimulation continues until you’re erect, then pauses until you’re not, repeated several times, trains your brain to stop treating a lost erection as a catastrophe and demonstrates that erections can return.
Mindfulness and breathing exercises during sexual activity help keep your attention on physical sensation instead of spiraling into self-monitoring. Restructuring the beliefs feeding the anxiety also helps: challenging the idea that sex must follow a specific script, that losing an erection means something is “wrong” with you, or that your partner’s satisfaction depends entirely on penetration. These approaches have shown real results in clinical pilots, particularly for men whose erectile issues have no underlying physical cause.
Supplements That Have Some Evidence
L-arginine is the most studied supplement for erections. It’s a precursor to nitric oxide, the molecule that relaxes penile blood vessels. A meta-analysis of clinical trials found that arginine supplements at doses between 1,500 and 5,000 mg per day significantly improved erectile function compared to placebo. The effect was modest, not comparable to prescription medication, but measurable. It tends to work best for men with mild difficulties and may pair well with other lifestyle changes.
Other supplements marketed for erections (horny goat weed, tribulus, maca) have much weaker evidence. Be cautious with anything sold as a “natural Viagra” online, as these products are sometimes spiked with undisclosed pharmaceutical ingredients.
When Medication Makes Sense
Prescription options work by amplifying the same nitric oxide pathway your body already uses. They block the enzyme that breaks down the chemical signal responsible for keeping blood vessels relaxed, making it easier to get and stay hard when you’re aroused. They don’t create arousal on their own.
The two most commonly prescribed options differ mainly in timing. Sildenafil works within about 30 minutes, lasts 4 to 6 hours, and is taken before sex. Tadalafil kicks in within about 20 minutes, but its effects can last up to 36 hours (with a maximum window of up to 72 hours), making it popular for men who prefer spontaneity. Tadalafil also comes in a low daily dose so it’s always active in your system. Both are effective, and direct comparison studies have not found a clear winner in terms of overall satisfaction.
These medications work well for most men, but they’re addressing the symptom rather than the cause. If poor cardiovascular health, low testosterone, or anxiety is driving the problem, medication can buy time and break the cycle of failure while you work on the root issue.
Habits That Work Against You
Smoking damages blood vessel walls and reduces nitric oxide availability. It’s one of the strongest modifiable risk factors for erectile problems. Heavy alcohol use depresses the central nervous system and lowers testosterone over time. Even a few drinks in one session can make it temporarily harder to get an erection. Prolonged cycling on a poorly fitted saddle can compress the nerves and arteries that supply the penis, so if you ride frequently, invest in a proper saddle and adjust your position. Excess body fat, particularly around the midsection, converts testosterone into estrogen and promotes the kind of chronic inflammation that stiffens arteries.
Porn-related concerns come up frequently. While the research is still debated, some men find that heavy porn consumption raises their arousal threshold, making real-life stimulation feel less exciting by comparison. If you suspect this might be a factor, reducing consumption for a few weeks and observing any change is a low-risk experiment.

