Although not proven, it is likely that erectile dysfunction can be prevented by good general health, paying particular attention to body weight, exercise, and cigarette smoking. For example, heart disease and diabetes are problems that can cause erectile dysfunction, and both are preventable through lifestyle changes such as sensible eating and regular exercise. Furthermore, early diagnosis and treatment of associated conditions like diabetes, hypertension and high cholesterol may prevent or delay erectile dysfunction, or stop the erectile dysfunction from getting more serious.
Causes of impotence are many and include heart disease, high cholesterol, high blood pressure, obesity, metabolic syndrome, Parkinson's disease, Peyronie's disease, substance abuse, sleep disorders, BPH treatments, relationship problems, blood vessel diseases (such as peripheral vascular disease and others), systemic disease, hormonal imbalance, and medications (such as blood pressure and heart medications).
The severity of ED has been correlated with the extent of CVD. Banks et al reported that the risk of future CV events increased progressively according to ED severity.28 This was shown in both men with and without known CVD at baseline and after controlling for confounders. Solomon and colleagues found an inverse correlation between international index of erectile function (IIEF) scores and plaque burden seen on coronary angiography.29 In addition, Yaman et al demonstrated a significant correlation between ED severity on IIEF questionnaires and coronary artery calcification.30
MSA is a neurodegenerative disease of undetermined etiology, where ED is an early prominent sign occurring in 40% of men at the time of diagnosis (46,47). ED occurs in the majority of patients and the exact cause of it is unknown (48). Like PD, MSA likely affects the dopaminergic pathways within the brain essential for arousal (49). Orthostatic hypotension (OH) as a causal factor has been refuted by evidence that sildenafil can overcome reduced filling pressures, and the ED usually precedes the development of OH (46,49,50). Similar to other neurologic disorders that lead to ED, other disease related factors such as psychosocial stress, the burden of chronic illness, changed appearance, fatigue, decreased fine motor movement of fingers, immobility and diminished self-esteem due to loss of independence may contribute as well (51).
Additionally, the physiologic processes involving erections begin at the genetic level. Certain genes become activated at critical times to produce proteins vital to sustaining this pathway. Some researchers have focused on identifying particular genes that place men at risk for ED. At present, these studies are limited to animal models, and little success has been reported to date.  Nevertheless, this research has given rise to many new treatment targets and a better understanding of the entire process.
In their extensive review, Bassil and coworkers summarise the benefits and risks, with benefits such as improvement of sexual function, bone density, muscle strength, cognition and overall improvement in quality of life. Among the risks that have been suggested include erythrocytosis, liver toxicity, worsening of sleep apnoea and cardiac function, possibly increasing symptoms of benign prostatic hyperplasia (BPH). They also note that although a possibility of stimulation of prostate cancer has been hypothesised, no scientific or clinical evidence exists to this possible risk.38
There are also alternative treatments, such as using a penis pump or a penile injection. Penis pumps work by creating a vacuum and thereby causing more blood to flow to your penis. Penile injections need to be used shortly before intercourse. They contain a medication which widens your blood vessels. A doctor’s prescription is needed for the injections.
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.
Psychological factors — Psychological issues such as depression, anxiety, guilt or fear can sometimes cause sexual problems. At one time, these factors were thought to be the major cause of impotence. Doctors now know that physical factors cause impotence in most men with the problem. However, embarrassment or "performance anxiety" can make a physical problem worse.