Abnormalities in the vascular, neural, endocrine, muscular, or psychiatric systems can result in ED.2,3 EDDM is due to multisystemic disease. Atrophy or apoptosis of cavernosal smooth muscle can occur due to loss of Bcl-2 expression in cavernosal smooth muscle and lead to ED. Abnormal amounts of advanced glycation end products is a common occurrence. These chemicals may have an effect on potassium channels that facilitate intracellular calcium release and subsequent cavernosal smooth muscle relaxation. Connective tissue synthesis is increased due to transforming growth factor-beta. The decrease in smooth muscle and the increase in collagen decreases the compliance of the erectile tissue. Neuropathic damage to both the somatic and autonomic nerves has been clearly defined in DM. Partial occlusion of the pelvic or intracavernosal arteries, hypogonadotropic hypogonadism, and depression associated with a chronic illness (DM) can all play a primary or secondary role in the development of EDDM. On a molecular level, studies have demonstrated decreased levels of endothelial and neuronal nitric acid synthase (NS) and decreased cavernosal artery and sinusoidal response to nitric oxide. Abnormalities in nitric oxide rapidly render the functional syncytium of the corpora cavernosa unable to synchronously relax. As the patient with diabetes ages, the concentration of constrictors, including endothelin, prostanoids, and possibly angiotensin, increases as the production of the relaxants, including nitric oxide, vasointestinal peptide, and prostacyclin, decreases.
Physical and emotional stress — whether over-exercising, under-sleeping or just dealing with everyday stressors like work and a busy schedule — causes an increase in “stress hormones,” including cortisol and adrenaline. Stress can lower desire for sex. This is because stress can contribute to fatigue or preoccupation with other tasks. It can also significantly affect blood flow by increasing inflammation.

Low intracavernosal nitric oxide synthase levels are found in people with diabetes, smokers, and men with testosterone deficiency. Interference with oxygen delivery or nitric oxide synthesis can prevent intracavernosal blood pressure from rising to a level sufficient to impede emissary vein outflow, leading to an inability to acquire or sustain rigid erection. Examples include decreased blood flow and inadequate intracavernosal oxygen levels when atherosclerosis involves the hypogastric artery or other feeder vessels and conditions, such as diabetes, that are associated with suboptimal nitric oxide synthase activity.

Erectile dysfunction (ED) is common in cardiac patients and shares the same risk factors--smoking, hypertension, hyperlipidaemia and diabetes mellitus. Sexual activity is not unduly stressful to the heart and, providing patients are properly assessed using established guidelines, sexual intercourse can be enjoyed without increased risk. The treatment of ED in patients with cardiovascular disease has been transformed by the introduction of the oral phosphodiesterase type 5 inhibitors, the first of which was sildenafil. Success in restoring erectile function is possible in up to 80% of patients (depending on the aetiology) with minimal adverse effects. A synergistic hypotensive effect with nitrates, and almost certainly nicorandil, is the only major contraindication. ED in asymptomatic patients may be a marker of silent vascular disease or increased vascular risk factors and should alert the physician to the need for cardiac risk screening. ED is common in patients with cardiovascular disease and should be routinely enquired about. ED is a distressing condition for the man and his partner, and severely impairs quality of life. Patients with cardiovascular disease and patients with diabetes represent the largest group of patients with ED, the majority of whom benefit from the drug therapies currently available. Addressing ED in patients with cardiovascular disease can lead to a substantial improvement in quality of life and success is not difficult to achieve.
Cigarette smoking is an established risk factor in the development of atherosclerotic vascular changes and thus would be expected to play a role in the development of vasculogenic ED. The MMAS 9-year follow-up study found that the risk of developing moderate or complete ED in smokers was nearly doubled (odds ratio, 1.97) compared with that in matched nonsmokers.5x5Feldman, HA, Johannes, CB, Derby, CA et al. Erectile dysfunction and coronary risk factors: prospective results from the Massachusetts Male Aging Study. Prev Med. 2000; 30: 328–338

Sexual intercourse is an infrequent cause of myocardial infarction. In a study of 1774 patients after myocardial infarction, only 1.5% of these events occurred within 2 hours of sexual intercourse, and sexual activity was considered a direct contributing factor in 0.9%.8x8Muller, JE, Mittleman, A, Maclure, M, Sherwood, JB, Tofler, GH, and Determinants of Myocardial Infarction Onset Study Investigators. Triggering myocardial infarction by sexual activity: low absolute risk and prevention by regular physical exertion. JAMA. 1996; 275: 1405–1409
When your blood pressure is high for an extended time, it can damage the lining of your arteries and interfere with your blood flow. This appears to affect your ability to get and maintain an erection. A 2012 study published in the journal Current Opinion in Nephrology and Hypertension found that approximately 30 percent of men with hypertension complain of ED.
Physical and sexual activity can trigger acute cardiac events. In a recent meta-analysis, a significant association between acute cardiac events and episodic physical (relative risk 3.45 for myocardial infarction and 4.98 for sudden cardiac death) and sexual activity (relative risk 2.7 for myocardial infarction) was demonstrated.32 This association was attenuated among individuals with high levels of habitual physical activity (for every additional time per week the relative risk for myocardial infarction decreased by ∼45%, and the relative risk for sudden cardiac death decreased by 30%). The physical demands of sexual activity have been identified as follows. Studies conducted primarily in young married men showed that sexual activity with a person's usual partner is comparable with mild-to-moderate physical activity in the range of 3–4 metabolic equivalents of the task (METS).30,33 The heart rate rarely exceeds 130 b.p.m. and systolic blood pressure rarely exceeds 170 mmHg in normotensive individuals. Accordingly, demands during sexual activity correspond to walking 1.5 km (or 1 mile) on the flat in 20 min or briskly climbing two flights of stairs in 10 s. Generalization, however, may not characterize all individuals (especially those who are older, are less physically fit, or have CVD) or sexual activity circumstances (e.g. extramarital, unfamiliar setting, excessive food and alcohol consumption). Therefore, completing 4 min of the standard Bruce treadmill protocol (5–6 METS) without symptoms, ST segment changes, arrhythmias, or a fall in systolic BP identifies the safety of sexual activity.30,33
Crossref | PubMed | Scopus (23) | Google ScholarSee all References, 73x73Rajagopalan, P, Mazzu, A, Xia, C, Dawkins, R, and Sundaresan, P. Effect of high-fat breakfast and moderate-fat evening meal on the pharmacokinetics of vardenafil, an oral phosphodiesterase-5 inhibitor for the treatment of erectile dysfunction. J Clin Pharmacol. 2003; 43: 260–267

Penile implants - are generally used if physical damage (like an accident) makes the anatomical parts needed for an erection not work. These are inserted by surgery and can provide a permanent treatment choice if others fail to work. The implants can be semi-rigid or inflatable. They can be pretty expensive and are not usually available on the NHS.

Abstract | Full Text | Full Text PDF | PubMed | Scopus (58) | Google ScholarSee all References Theoretically, the risk of a cardiac event during sexual activity should be increased. Sexual activity is associated with an elevated heart rate, blood pressure level, and myocardial oxygen demand, and this increase in hemodynamic stress may result in myocardial ischemia.79x79Kimmel, SE. Sex and myocardial infarction: an epidemiologic perspective. Am J Cardiol. 2000; 86: 10F–13F
Characteristics that imply a higher risk is severe ED (SHIM 1–7) and ED duration >3 years.15,30 Vascular and circulating biomarkers may help to characterize further the patient with ED.23 Of the wide array of biomarkers that have been proposed for the assessment of cardiovascular risk in asymptomatic adults,34,35 some have been studied specifically in the context of ED.23Table 4 offers a critical evaluation of these biomarkers. Such tests should be considered as potentially helpful and thus recommended where available, but not mandatory.30 Despite its potent predictive ability recently shown,36 exposure to radiation with coronary artery calcium scoring should be carefully weighed. Although not specific for ED, it might be reasonable to evaluate biomarkers that have been proposed for the intermediate-risk patient such as uric acid, glycated haemoglobin, microalbuminuria, and lipoprotein-associated phospholipase A2.30
Gazzaruso C,  Solerte SB,  Pujia A,  Coppola A,  Vezzoli M,  Salvucci F,  Valenti C,  Giustina A,  Garzaniti A. Erectile dysfunction as a predictor of cardiovascular events and death in diabetic patients with angiographically proven asymptomatic coronary artery disease: a potential protective role for statins and 5-phosphodiesterase inhibitors, J Am Coll Cardiol , 2008, vol. 51 (pg. 2040-2044)https://doi.org/10.1016/j.jacc.2007.10.069
Before a man concludes that oral drugs don’t work for him, he should have his testosterone levels checked to rule out hormone deficiency as the cause of (or as a contributor to) his sexual dysfunction. Other symptoms of low testosterone include a low sex drive and infertility. Checking testosterone levels requires a blood test. If a man’s levels of testosterone are decreased or at the lower end of normal, his doctor may prescribe supplemental testosterone therapy, either as testosterone injections or testosterone gel, which is applied daily to the skin. In some cases, testosterone therapy alone can resolve sexual dysfunction, or it can be combined with the use of oral erectile dysfunction drugs.