How to Maintain an Erection: What Actually Works

Maintaining an erection depends on one thing above all else: healthy blood flow. When you’re aroused, your nervous system triggers the release of nitric oxide, a signaling molecule that relaxes the smooth muscle inside the penis and allows blood to rush in. That blood gets trapped under pressure, producing rigidity. Anything that supports this process helps you stay hard, and anything that disrupts it makes erections harder to keep.

About 40% of men experience some degree of erectile difficulty by age 40, and that number rises to 70% by age 70. But age alone isn’t the main driver. The factors that actually determine erection quality, like blood vessel health, hormone levels, sleep, and stress, are largely within your control.

How Erections Actually Work

Understanding the mechanism helps explain why certain habits matter so much. Sexual arousal sends a signal from your brain down through your spinal cord to nerves in the penis. Those nerves release nitric oxide, which kicks off a chain reaction: smooth muscle cells lining the blood vessels relax, arteries widen, and blood floods into two spongy chambers called the corpora cavernosa. As those chambers fill, they press against the surrounding tissue and compress the veins that would normally drain blood away. That trapping effect is what keeps the erection firm.

Nitric oxide plays two distinct roles. A quick initial burst starts the erection, and then a slower, sustained release from the blood vessel lining maintains it. This is why endothelial health (the condition of the cells lining your blood vessels) is so central to erection quality. Damaged or inflamed endothelial cells produce less nitric oxide, which means less blood flow and weaker rigidity. The same endothelial dysfunction that causes heart disease also causes erectile problems, often years before any cardiac symptoms appear.

Cardiovascular Fitness Is Erectile Fitness

The blood vessels in the penis are smaller than those supplying the heart, so they tend to show damage first. Erectile difficulty is now recognized as an early warning sign of cardiovascular disease. The connection runs through the endothelium: when those vessel-lining cells can’t produce enough nitric oxide, arteries throughout the body lose their ability to dilate properly. In the penis, that means insufficient blood flow to get or stay hard.

Aerobic exercise directly improves endothelial function. Regular cardio, whether running, cycling, swimming, or brisk walking, increases nitric oxide production and keeps blood vessels flexible. You don’t need to train like an athlete. Consistent moderate-intensity exercise several times a week makes a measurable difference in vascular health and, by extension, erection quality.

Foods That Support Blood Flow

A Mediterranean-style diet is the best-studied dietary pattern for erectile function. Research consistently links it to lower risk and severity of erectile problems. The mechanism is straightforward: this eating pattern improves blood lipids, blood sugar regulation, and antioxidant defenses while boosting levels of arginine, the amino acid your body uses to produce nitric oxide.

The key components include virgin olive oil (which appears to directly increase nitric oxide availability), leafy greens and beets (rich in dietary nitrates your body converts to nitric oxide), tomatoes (whose lycopene and vitamin C reduce inflammation and improve vascular function), nuts, whole grains, fish, and moderate amounts of red wine. Fruits and vegetables high in flavonoids, like berries, citrus, and dark chocolate, also support endothelial health. The pattern matters more than any single food. A diet built around these ingredients gives your blood vessels the raw materials they need to function well.

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 can improve rigidity and help you maintain hardness longer. A randomized trial published in the British Journal of General Practice found that 40% of men with erectile dysfunction regained normal function through pelvic floor exercises alone, and another 34.5% saw improvement. That’s a 75% response rate from an exercise you can do at home.

The technique involves contracting the muscles you’d use to stop the flow of urine or prevent passing gas. You can practice in three positions:

  • Standing: Feet apart, squeeze your pelvic floor. If you look in a mirror, the base of the penis should draw slightly toward your abdomen and your testicles should lift. Hold each contraction as strongly as you can. Do 3 repetitions morning and evening.
  • Sitting: Sit with knees apart and tighten as if lifting your pelvic floor off the chair without clenching your buttocks. Same protocol: 3 strong holds, twice daily.
  • Lying down: On your back with knees bent and apart, perform 3 maximal contractions morning and evening.

Avoid holding your breath, sucking in your stomach, or tensing your glutes. The goal is to isolate the pelvic floor. As you get stronger, try engaging these muscles at about half effort while walking, and during sex, rhythmic contractions can help maintain rigidity. Slower thrusting generates higher internal pressure in the penis, which also helps.

What Nicotine Does to Erections

Nicotine is one of the most direct threats to erection quality. It works against you through multiple pathways. Smoking decreases arterial blood flow into the penis and disrupts the vein-compression mechanism that traps blood inside it. Free radicals in cigarette smoke reduce nitric oxide production, either by destroying it directly or by damaging its precursors. On top of that, nicotine stimulates the release of stress hormones (epinephrine and norepinephrine) from nerve endings, and this sympathetic nervous system activation is the same response your body uses to keep the penis flaccid.

These effects aren’t limited to long-term smokers. Studies on nonsmoking men given nicotine showed reduced physiological arousal even from a single dose. Quitting smoking is one of the fastest ways to start improving vascular function and erection quality.

Alcohol and Erection Quality

Small amounts of alcohol can reduce inhibition, but beyond a drink or two, alcohol works against erections. It depresses the central nervous system, slowing the nerve signaling required to initiate and sustain arousal. It also impairs blood vessel dilation and can lower testosterone with chronic use. If you’re noticing trouble maintaining erections during or after drinking, cutting back is a simple first experiment.

Sleep and Testosterone

Your body produces most of its testosterone during sleep, particularly during deep and REM stages. Poor sleep quality or sleep disorders like obstructive sleep apnea can suppress testosterone and directly impair erectile function through multiple channels: abnormal sympathetic nervous system activity, endothelial dysfunction, drops in blood oxygen, and fragmented REM sleep.

Testosterone levels below about 264 ng/dL are considered low for healthy adult men, and levels below 200 ng/dL are associated with noticeably decreased sleep-related erections. Clinical trials have shown that men with levels below 275 ng/dL experience meaningful improvements in sexual function with testosterone treatment. If you’re sleeping poorly and struggling with erections, a sleep evaluation and a morning testosterone blood test are reasonable starting points.

Managing Performance Anxiety

Stress and anxiety activate your sympathetic nervous system, the “fight or flight” response that constricts blood vessels and works to keep the penis flaccid. This creates a frustrating feedback loop: you lose an erection, worry about it next time, and the worry itself makes it more likely to happen again. Interestingly, research on men with purely psychological erectile dysfunction found that anxiety didn’t prevent erections triggered by medication, suggesting the mental barrier is about the brain’s ability to initiate the arousal signal rather than a physical inability to respond.

Practical strategies include shifting your focus away from performance and toward physical sensation, slowing down, communicating openly with your partner, and reducing pressure around intercourse specifically. Mindfulness-based approaches and cognitive behavioral therapy have both shown effectiveness. For some men, using medication a few times to break the anxiety cycle restores confidence enough that they no longer need it.

When Medication Helps

PDE5 inhibitors (the class that includes sildenafil, tadalafil, and vardenafil) work by blocking the enzyme that breaks down the signal nitric oxide produces. This amplifies whatever natural arousal you’re already generating. They don’t create arousal from nothing; they make the blood flow response stronger and longer-lasting once arousal begins. All three are typically taken about an hour before sexual activity. Tadalafil is also available in a low daily dose that keeps the drug active around the clock, removing the need to plan around timing.

These medications are effective for most men, but they work best alongside the lifestyle factors above. A man who exercises, eats well, sleeps enough, and doesn’t smoke will generally get a stronger response from medication than one who relies on the pill alone. For men whose erectile difficulty stems from severely low testosterone, addressing hormone levels first often improves the response to PDE5 inhibitors as well.