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.
However, a review of a United Kingdom medical record database found no evidence that the use of 5-alpha reductase inhibitors independently increase the risk for ED. In 71,849 men with benign prostatic hyperplasia (BPH), the risk of ED was not increased with the use of finasteride or dutasteride only (odds ratio [OR] 0.94), or a 5-alpha reductase inhibitor plus an alpha blocker (OR 0.92) compared with an alpha blocker only. In addition, the risk of ED was not increase in 12 346 men prescribed finasteride 1 mg for alopecia, compared with unexposed men with alopecia (OR 0.95). The risk of ED did increase with longer duration of BPH, regardless of drug exposure. 
Alteration of NO levels is the focus of several approaches to the treatment of ED. Inhibitors of phosphodiesterase, which primarily hydrolyze cGMP type 5, provided the basis for the development of the PDE5 inhibitors. Chen et al administered oral L-arginine and reported subjective improvement in 50 men with ED.  These supplements are readily available commercially. Reported adverse effects include nausea, diarrhea, headache, flushing, numbness, and hypotension.
Cross-sectional studies conducted at the time of diagnosis of BPH have failed to show consistent differences in testosterone levels between patients and controls. A prospective study also failed to demonstrate a correlation between testosterone and the development of BPH (Gann et al 1995). Clinical trials have shown that testosterone treatment of hypogonadal men does cause growth of the prostate, but only to the size seen in normal men, and also causes a small increase in prostate specific antigen (PSA) within the normal range (Rhoden and Morgentaler 2005). Despite growth of the prostate a number of studies have failed to detect any adverse effects on symptoms of urinary obstruction or physiological measurements such as flow rates and residual volumes (Snyder et al 1999; Kenny et al 2000, 2001). Despite the lack of evidence linking symptoms of BPH to testosterone treatment, it remains important to monitor for any new or deteriorating problems when commencing patients on testosterone treatment, as the small growth of prostate tissue may adversely affect a certain subset of individuals.