Organic ED involves abnormalities the penile arteries, veins, or both and is the most common cause of ED, especially in older men. When the problem is arterial, it is usually caused by arteriosclerosis, or hardening of the arteries, although trauma to the arteries may be the cause. The controllable risk factors for arteriosclerosis--being overweight, lack of exercise, high cholesterol, high blood pressure, and cigarette smoking--can cause erectile failure often before progressing to affect the heart.
Nerve or spinal cord damage: Damage to the spinal cord and nerves in the pelvis can cause erectile dysfunction. Nerve damage can be due to disease, trauma, or surgical procedures. Examples include injury to the spinal cord from automobile accidents, injury to the pelvic nerves from prostate surgery for cancer (prostatectomy), and some surgeries for colorectal cancer, radiation to the prostate, surgery for benign prostatic enlargement, multiple sclerosis (a neurological disease with the potential to cause widespread damage to nerves), and long-term diabetes mellitus.
Factors that mediate contraction in the penis include noradrenaline, endothelin-1, neuropeptide Y, prostanoids, angiotensin II, and others not yet identified. Factors that mediate relaxation include acetylcholine, nitric oxide (NO), vasoactive intestinal polypeptide, pituitary adenylyl cyclase–activating peptide, calcitonin gene–related peptide, adrenomedullin, adenosine triphosphate, and adenosine prostanoids.
If PDE5 drugs don't work or cannot be used because of potential side effects, your doctor can recommend other therapies. The drug alprostadil (Caverject, Edex, Muse) allows blood to flow more freely in the penis, leading to an erection. The drug can be injected with a tiny needle into your penis. Or, a small pellet (suppository) can be inserted into the opening of the penis. Suppositories and injections are effective in the majority of men.
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.
The development of an erection is a complex event involving integration of psychologic, neurologic, endocrine, vascular, and local anatomic systems. Positron emission tomography scanning studies have suggested that sexual arousal is activated in higher cortical centers that then stimulate the medial preoptic and paraventricular nuclei of the hypothalamus.5 These signals ultimately descend through a complex neural network involving the parasympathetic nervous system and eventually activate parasympathetic nerves in the sacral area (S2 to S4).
Something else to consider is your porn use. If you are masturbating to very stimulating porn on a regular basis then it might be difficult to get as aroused in the bedroom with your partner. Watching video pornography is very stimulating and often men have difficulty creating that same level of arousal or stimulation with their partners. Consider masturbating without technology as visual images in your head are less stimulating then watching something live. Try this for two weeks and see if your erection quality improves.
An occasional problem achieving an erection is nothing to worry about. But failure to do so more than 50% of the time at any age may indicate a condition that needs treatment. About 40% of men in their 40s report at least occasional problems getting and maintaining erections. So do more than half (52%) of men aged 40 to 70, and about 70% of men in their 70s.
Diabetes is a well-recognized risk factor for ED. A systematic review and meta-analysis found that the prevalence of ED was 37.5% in type 1 diabetes, 66.3% in type 2 diabetes, and 52.5% in diabetes overall—a rate approximately 3.5 times higher than that in controls.  The etiology of ED in diabetic men probably involves both vascular and neurogenic mechanisms. Evidence indicates that establishing good glycemic control can minimize this risk.
In rare cases, the drug Viagra ® can cause blue-green shading to vision that lasts for a short time. In rare cases, the drug Cialis® can cause or increase back pain or aching muscles in the back. In most cases, the side effects are linked to PDE5 inhibitor effects on other tissues in the body, meaning they are working to increase blood flow to your penis and at the same time impacting other vascular tissues in your body. These are not ‘allergic reactions'.