Treatment depends on the underlying cause. In general, exercise, particularly of the aerobic type, is effective for preventing ED during midlife. Exercise as a treatment is under investigation.:6, 18–19 For tobacco smokers, cessation often results in a significant improvement. Oral pharmacotherapy and vacuum erection devices are first-line treatments,:20, 24 followed by injections of drugs into the penis, as well as penile implants.:25–26 Vascular reconstructive surgeries are beneficial in certain groups.
This content is provided as a service of the National Institute of Diabetes and Digestive and Kidney Diseases (NIDDK), part of the National Institutes of Health. The NIDDK translates and disseminates research findings through its clearinghouses and education programs to increase knowledge and understanding about health and disease among patients, health professionals, and the public. Content produced by the NIDDK is carefully reviewed by NIDDK scientists and other experts.
Specially designed vacuum devices to produce erections have been used successfully for many years. Vacuum devices are safe, relatively inexpensive, and reliable. Vacuum devices do not require surgery. Vacuum devices are available over the counter or by prescription. It is important to make sure that the vacuum device have a mechanism to prevent too high of a vacuum (negative pressure).
There are many effective treatments for impotence. The most popular is a class of drugs called phosphodiesterase type 5 (PDE5) inhibitors. These include sildenafil (Viagra), vardenafil (Levitra), tadalafil (Cialis) and avanafil (STENDRA). These drugs are taken in pill form. They work in most men. But they are less effective in men with neurological causes of impotence.
The vascular processes that produce an erection are controlled by the nervous system and certain prescription medications may have the side effect of interfering with necessary nerve signals. Among the possible culprits are a variety of stimulants, sedatives, diuretics, antihistamines, and drugs to treat high blood pressure, cancer, or depression. But never stop a medication unless your doctor tells you to. In addition, alcohol, tobacco, and illegal drugs, such as marijuana, may contribute to the dysfunction.
A physical cause can be identified in about 80% of cases. These include cardiovascular disease, diabetes mellitus, neurological problems such as following prostatectomy, hypogonadism, and drug side effects. Psychological impotence is where erection or penetration fails due to thoughts or feelings; this is somewhat less frequent, in the order of about 10% of cases. In psychological impotence, there is a strong response to placebo treatment.
Implantable penile prostheses are usually considered a last resort for treating impotence. They are implanted in the corpora cavernosa to make the penis rigid without the need for blood flow. The semirigid type of prosthesis consists of a pair of flexible silicone rods that can be bent up or down. This type of device has a low failure rate but, unfortunately, it causes the penis to always be erect, which can be difficult to conceal under clothing.
Exercise and lifestyle modifications may improve erectile function. Weight loss may help by decreasing inflammation, increasing testosterone, and improving self-esteem. Patients should be educated to increase activity, reduce weight, and stop smoking, as these efforts can improve or restore erectile function in men without comorbidities. Precise glycemic control in diabetic patients and pharmacologic treatment of hypertension may be important in preventing or reducing sexual dysfunction. 
Research has even found possible links to frequent ejaculation and a lower risk of prostate cancer. In one study of 32,000 men published in 2016 in the journal European Urology, for example, men who ejaculated at least 21 times per month while in their 20s were less likely to be diagnosed with prostate cancer than those who ejaculated four to seven times per month. And men who ejaculated more often in their 40s were 22 percent less likely to get a prostate cancer diagnosis.
Several treatments were promoted in the pre-PGE1, pre-prostaglandin era, including yohimbine, trazodone, testosterone, and various herbal remedies. None of these is currently recommended under the updated American Urological Association Guidelines for the Treatment of Erectile Dysfunction.15 Testosterone supplementation is only recommended for men with low testosterone levels.
Alprostadil self-injection. With this method, you use a fine needle to inject alprostadil (Caverject Impulse, Edex) into the base or side of your penis. In some cases, medications generally used for other conditions are used for penile injections on their own or in combination. Examples include papaverine, alprostadil and phentolamine. Often these combination medications are known as bimix (if two medications are included) or trimix (if three are included).
Among the phenomena in the ageing man are a decrease in erectile function and testosterone levels. Add to these, increased risk for CVD, muscle wasting, decrease in bone density and libido, with all of these factors having an interplay with testosterone metabolism.33 Androgens play a key role in maintaining erectile function through four main mechanisms. Androgen deprivation has been shown to result in impairment of NO synthase release, altered PDE5 expression and activity, impaired cavernosal nerve function, and contribution to veno-occlusive disease in the penis.34 The role of testosterone replacement therapy (TRT) as a potential to improve erectile function in the man with ED remains an issue for patient and physicians who are comfortable treating androgen deficiency which include primary care physicians and specialists. Androgens are known to have a significant impact on the function of the smooth musculature within the corpus spongiosum.35
These are not currently approved by the FDA for ED management, but they may be offered through research studies (clinical trials). Patients who are interested should discuss the risks and benefits (informed consent) of each, as well as costs before starting any clinical trials. Most therapies not approved by the FDA are not covered by government or private insurance benefits.