Many common medications for treating hypertension, depression, and high blood lipids (high cholesterol) can contribute to erectile dysfunction (see above). Treatment of hypertension is an example. There are many different types (classes) of medications for high blood pressure; these include beta-blockers, calcium channel blockers, diuretics (medications that increase urine volume), angiotensin converting enzyme inhibitors (ACE inhibitors), and angiotensin receptor blockers (ARBs). Patients may use these medications alone or in combination to control blood pressure. Some of these medications can cause troubles with erections. For example, Inderal (a beta-blocker) and hydrochlorothiazide (a diuretic) cause erectile dysfunction, while calcium channel blockers and ACE inhibitors do not seem to affect erectile function. On the other hand, other medications (such as angiotensin receptor blockers [ARB] including losartan [Cozaar] and valsartan [Diovan]) may actually help with erections. Therefore, if possible, you may benefit from changing your medications, but this requires approval by your prescribing health care provider.
Erectile dysfunction (ED) affects 50% of men older than 40 years,  exerting substantial effects on quality of life.  This common problem is complex and involves multiple pathways. Penile erections are produced by an integration of physiologic processes involving the central nervous, peripheral nervous, hormonal, and vascular systems. Any abnormality in these systems, whether from medication or disease, has a significant impact on the ability to develop and sustain an erection, ejaculate, and experience orgasm.
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. 
In order to establish whether normal erections are occurring overnight (nocturnal erections), the doctor may organise nocturnal penile tumescence (NPT) testing. This involves wearing a monitor overnight in your own home. The data from this monitor is then assessed to analyse how often erections occurred, how long they lasted, and how rigid and large the penis was during the erections. If NPT testing is normal, the cause of erectile dysfunction is usually psychological. If not, further testing of the blood flow in the genital area may be required to see if there is blockage or leakage. The doctor may also organise a blood test of levels of hormones such as testosterone, prolactin and thyroid stimulating hormone to see if these are contributing to the erectile dysfunction.
Nearly every primary care physician, internist and geriatrician now understand that many older men retain an interest in sexual activity as they age. Some primary care physicians think that sexual potency in older men is the norm, and that if it is lacking, it is ‘all in the head.’ This viewpoint has not been supported by current literature. The Massachusetts Male Aging Study (MMAS) found that 52% of men between 40 and 70 years old reported having some form of erectile dysfunction (ED).1 The reality is that ED is a natural part of ageing and that the prevalence increases with age. In the MMAS, they found that roughly 50% of men at 50 years old, 60% of men at 60 years old and 70% of men at 70 years old had ED. Thus, nearly all men who live long enough should develop ED. The myths that surround the problems of impotence or ED confound the attempts of patients to receive treatment and the attempts of physicians to help them.1
Risks associated with injection therapy including bleeding, pain with injection, penile pain, priapism, and corporal fibrosis (scarring inside of the corpora cavernosa). There is also concern that repetitive injections in the same area could cause scar tissue to build up in the tunica albuginea that could create penile curvature. Thus, doctors recommended that one alternate sides with injection and perform injections no more frequent than every other day.
The somatosensory pathways for erections originate in the penile skin, glans and urethra. Glans afferent sensory free nerve endings are 10-fold more than their corpuscular receptors, and are derived from Aδ and unmyelinated C fibers. The nerve endings coalesce to form the dorsal penile nerve along with other sensory nerve fibers. Through the pudendal nerve they enter the S2-4 nerve roots to terminate on spinal neurons and interneurons. The dorsal nerve is not purely somatic, however. Nerve bundles within the dorsal nerve contain nitric oxide (NO) synthase, found typically in autonomic nerves, and stimulation of the sympathetic chain can leak to evoked potentials from the dorsal nerve and vice versa (10-12).
Oral therapies via the PDE5i sildenafil, vardenafil, and tadalafil have been proven to be generally safe and effective in select NED populations. The majority of the treatment effectiveness data has been generated in the SCI population. Data regarding the use of PDE5i outside of the SCI population is lacking (58). Furthermore, the ED that exists in the population with neurologic disorders is often multifactorial and may be caused by psychogenic, psychosocial, hormonal, medication-related and disability-related factors. A careful evaluation of each patient must be performed to isolate these factors prior to initiating vasoactive therapy.
Modern drug therapy for ED made a significant advance in 1983, when British physiologist Giles Brindley dropped his trousers and demonstrated to a shocked Urodynamics Society audience his papaverine-induced erection. The drug Brindley injected into his penis was a non-specific vasodilator, an alpha-blocking agent, and the mechanism of action was clearly corporal smooth muscle relaxation. The effect that Brindley discovered established the fundamentals for the later development of specific, safe, and orally effective drug therapies.[better source needed][better source needed]
The nerves and endothelium of sinusoids and vessels in the penis produce and release transmitters and modulators that control the contractile state of corporal smooth muscles. Although the membrane receptors play an important role, downstream signaling pathways are also important. The RhoA–Rho kinase pathway is involved in the regulation of cavernosal smooth muscle contraction. 
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.
Treatment involves addressing the underlying causes, lifestyle modifications, and addressing psychosocial issues. In many cases, a trial of pharmacological therapy with a PDE5 inhibitor, such as sildenafil, can be attempted. In some cases, treatment can involve inserting prostaglandin pellets into the urethra, injecting smooth muscle relaxants and vasodilators into the penis, a penile prosthesis, a penis pump, or vascular reconstructive surgery.
Patients at high cardiovascular risk should not be treated for ED until their cardiac condition is stabilize. These conditions include unstable or refractory angina, myocardial infarction or cerebrovascular accident within the past 2 weeks, uncontrolled hypertension, New York Heart Association (NYHA) Functional Classification III-IV congestive heart failure, high-risk arrhythmias, hypertrophic obstructive cardiomyopathies, and moderate-to-severe valvular disease.25 This class of drugs is also contraindicated in patients who use nitroglycerin or nitrate-containing compounds.26, 27
Infection is a concern after placement of a prosthesis and is a reported complication in 8%-20% of men undergoing placement of a penile prosthesis. If a prosthesis becomes infected (redness, pain, and swelling of the penis and sometimes purulent drainage are signs of infection), the prosthesis must be removed. Depending on the timing and severity of the infection and your surgeon's preference, the area can be irrigated extensively with antibiotic solutions and a new prosthesis placed at the same time or removal of the infected prosthesis and an attempt to place a new prosthesis made at a later time when the infection is totally cleared.
Herbal supplements such as ginkgo biloba, saw palmetto, and yohimbe have been touted as sexual enhancers, and some men have been tempted to try them to treat erectile dysfunction. Bennett warns, however, that none has been approved by the FDA or even shown by any reliable studies to prevent, treat, or improve erectile dysfunction. Moreover, supplements are unregulated and can have many side effects or interfere with prescribed medications you’re already taking. Don’t jeopardize your health by taking a supplement to treat erectile dysfunction without first talking with your doctor.
Another approach is vacuum therapy. The man inserts his penis into a clear plastic cylinder and uses a pump to force air out of the cylinder. This forms a partial vacuum around the penis, which helps to draw blood into the corpora cavernosa. The man then places a special ring over the base of the penis to trap the blood inside it. The only side effect with this type of treatment is occasional bruising if the vacuum is left on too long.
Clinical studies have suggested that these devices are effective and acceptable to a large number of patients with ED of varying causes, including psychogenic erectile failure. These devices are safe and can restore a man’s ability to achieve penetrative intercourse, with one study suggesting nearly 95% success with adequate instruction and support.30 However, satisfaction with this treatment modality typically wanes with time, as patients report dissatisfaction with how cumbersome or unnatural the devices are to use, hinging or buckling of the erection with thrusting, and dissatisfaction with the fact that the erection is ischemic and therefore cold, which can be off-putting to the partner.
In a prospective, multicenter, single-armed study of ED patients who exhibited a suboptimal response to PDE5 inhibitors, the investigators found that percutaneous implantation of zotarolimus-eluting stents in focal atherosclerotic lesions was both safe and feasible and was associated with clinically meaningful improvement on subjective and objective measures of erectile function. 
The main surgical treatment of ED involves insertion of a penile implant (also called penile prostheses). Because penile vascular surgery is not recommended for aging males who have failed oral PDE5 inhibitors, ICI or IU therapies, implants are the next step for these patients. Although placement of a penile implant is a surgery which carries risks, they have the highest rates of success and satisfaction among ED treatment options.