"Erectile dysfunction can be a very serious issue because it's a marker of underlying cardiovascular disease, and it often occurs before heart conditions become apparent. Therefore, men should consider improving their weight and overall nutrition, exercise more, drink less alcohol and have a better night's sleep, as well as address risk factors such as diabetes, high blood pressure and cholesterol.
Trauma to the pelvic blood vessels or nerves can also lead result in ED. Bicycle riding for long periods has been implicated as an etiologic factor; direct compression of the perineum by the bicycle seat may cause vascular and nerve injury.  On the other hand, bicycling for less than 3 hours per week may be somewhat protective against ED.  Some of the newer bicycle seats have been designed to diminish pressure on the perineum. [37, 38]
Both ED and low testosterone (hypogonadism) increase with age. The incidence of the latter is 40% in men aged 45 years and older.  Testosterone is known to be important in mood, cognition, vitality, bone health, and muscle and fat composition. It also plays a key role in sexual dysfunction (eg, low libido, poor erection quality, ejaculatory or orgasmic dysfunction, reduced spontaneous erections, or reduced sexual activity). 
Phosphodiesterase type V inhibitors (PDE-5 inhibitors) are the most commonly used therapy for erectile dysfunction. These medications work by preventing the breakdown of chemicals that stimulate increased blood flow into the penis. Several different PDE-5 inhibitors are available, which differ slightly in how to use them and their side effects. They appear to be equally effective in the treatment of erectile dysfunction in general, but some individuals may respond to one of these medications more effectively than another.
Vascular damage may result from radiation therapy to the pelvis and prostate in the treatment of prostate cancer.  Both the blood vessels and the nerves to the penis may be affected. Radiation damage to the crura of the penis, which are highly susceptible to radiation damage, can induce ED. Data indicate that 50% of men undergoing radiation therapy lose erectile function within 5 years after completing therapy; fortunately, some respond to one of the PDE5 inhibitors.
For best results, men with ED take these pills about an hour or two before having sex. The drugs require normal nerve function to the penis. PDE5 inhibitors improve on normal erectile responses helping blood flow into the penis. Use these drugs as directed. About 7 out of 10 men do well and have better erections. Response rates are lower for Diabetics and cancer patients.