How to Get an Erection When You Have ED: What Works

Getting an erection with erectile dysfunction is possible, and most men have several effective options. The approach that works best depends on whether your ED is caused by blood flow problems, low hormones, psychological factors, or a combination. Treatments range from oral medications that work within 30 minutes to lifestyle changes that can restore natural function over weeks or months.

How ED Medications Work

The most common first step is an oral medication like sildenafil (Viagra), tadalafil (Cialis), or vardenafil (Levitra). These drugs don’t automatically cause an erection. Instead, they make it much easier to get one when you’re sexually aroused. During arousal, your body releases a chemical signal that relaxes the blood vessels in the penis, allowing blood to flow in. An enzyme called PDE5 normally breaks down that signal. These medications block that enzyme, so the signal stays active longer and blood flow increases enough to produce a firm erection.

The key practical difference between options is how long they last. Sildenafil and vardenafil typically work for four to six hours, while tadalafil lasts up to 36 hours. That longer window gives some men more flexibility and less pressure to time things precisely. All of them generally start working within 30 to 60 minutes, though taking them on a full stomach can slow absorption. Your doctor will typically start you on a moderate dose and adjust based on results and side effects.

Who Shouldn’t Take These Medications

If you take nitrate medications for chest pain (nitroglycerin, isosorbide), these drugs are off limits. Both nitrates and ED medications increase the same chemical messenger in your blood vessels, and combining them can cause a dangerous drop in blood pressure. This also applies to recreational “poppers” (amyl nitrite). If you take alpha-blockers for an enlarged prostate, ED medications can still be an option, but your doctor needs to stabilize your alpha-blocker dose first and start the ED medication at a low dose to avoid blood pressure problems.

Vacuum Erection Devices

A vacuum device (sometimes called a penis pump) is a non-drug option that works mechanically. You place a plastic cylinder over the penis, use a hand pump or battery pump to create suction that draws blood into the shaft, then slide a constriction ring onto the base to keep the blood in place. The ring should stay on for no more than 30 minutes to avoid tissue damage. Many men use these as an alternative to medication or alongside it. The erection feels slightly different from a natural one since the blood is held in place artificially, and the penis may feel cool to the touch or appear slightly discolored. Still, it’s firm enough for intercourse for most users.

Penile Injections

If oral medications don’t work well enough, injectable medication is a highly effective next step. A drug called alprostadil is injected directly into the side of the penis using a very fine needle. It works by relaxing blood vessel walls locally, producing an erection within 5 to 20 minutes. About 80% of men get an erection firm enough for intercourse with this method. The idea of a needle sounds alarming, but the needle is small and most men report the discomfort is minimal once they’ve done it a few times. Your doctor will train you on the technique and find the right dose during an office visit before you use it at home.

Check Your Testosterone

Low testosterone doesn’t cause ED in every man, but it can be a contributing factor, especially if you’re also experiencing low energy, reduced sex drive, or loss of muscle mass. The American Urological Association defines low testosterone as a total level below 300 ng/dL, confirmed by two separate blood draws taken in the early morning when levels are highest. If your levels are genuinely low and you have symptoms, testosterone replacement can improve your desire for sex and may improve erection quality, sometimes enough on its own, sometimes in combination with other treatments.

Exercise as Treatment

Regular aerobic exercise can improve erectile function to a degree that rivals medication for mild to moderate ED. A review of 11 clinical trials involving over 1,000 men found that exercising 30 to 60 minutes, three to five times per week, produced measurable improvements. Walking, running, and cycling were the most commonly studied activities. The connection is straightforward: erections depend on healthy blood flow, and cardiovascular exercise improves blood vessel function throughout the body, including the penis.

Pelvic floor exercises (Kegels) target the muscles that directly support erections. In a controlled trial, 40% of men with ED regained normal erectile function after six months of pelvic floor training, and another 34.5% saw meaningful improvement. That’s nearly three out of four men getting better from exercise alone. The protocol involved performing three maximal contractions in standing, sitting, and lying positions each morning and evening, holding each squeeze for several seconds. Men were also taught to gently engage the pelvic floor at about half strength while walking and to contract these muscles during sexual activity to help maintain rigidity.

Diet and Weight

What you eat matters more than most men realize. Men with high adherence to a Mediterranean-style diet, rich in olive oil, vegetables, fruits, whole grains, nuts, fish, and moderate wine, have significantly lower rates of ED and less severe symptoms compared to men with poor dietary habits. The effect is especially strong in men with type 2 diabetes, which is one of the most common underlying causes of ED. This eating pattern improves blood vessel health, reduces inflammation, and helps control blood sugar, all of which directly support erectile function. If you’re carrying excess weight, losing even a moderate amount can make a noticeable difference.

When ED Is Psychological

Performance anxiety is one of the most common causes of ED in younger men, and it creates a vicious cycle: one episode of difficulty leads to worry, which makes the next attempt harder, which increases the worry further. If you can get erections during sleep, while masturbating, or when you first wake up, psychological factors are likely playing a significant role.

Cognitive behavioral sex therapy addresses this directly. A pilot study found it was as effective as sildenafil for improving erection scores and was actually better at reducing anxiety. The therapy typically involves psychosexual education, identifying and challenging catastrophic thoughts (“it’s going to happen again”), mindfulness and breathing techniques, and a structured series of physical exercises done with a partner. These exercises, called sensate focus, gradually rebuild comfort and arousal without the pressure of intercourse. You start with non-sexual touching, progress to genital contact without the goal of orgasm, and eventually work toward intercourse at a pace that keeps anxiety low. The “stop and start” technique, where your partner stimulates you to erection, stops until it fades, and repeats the cycle, teaches your body that losing an erection isn’t failure and that it comes back.

Combining Approaches

Most men get the best results by stacking strategies rather than relying on a single one. Taking medication while also starting an exercise routine and improving your diet attacks the problem from multiple angles. If anxiety is part of the picture, adding therapy prevents you from becoming psychologically dependent on pills. Some men start with medication to break the anxiety cycle, regain confidence, and then gradually reduce their reliance on it as lifestyle changes and therapy take effect. The goal isn’t necessarily to eliminate all treatment. It’s to find a reliable combination that gives you consistent results with the fewest side effects and the least disruption to spontaneity.