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).
Since endothelial dysfunction, CVD and ED are closely associated in epidemiological studies, the question for clinicians is whether to recommend the man presenting with ED undergo a cardiovascular (CV) evaluation. Clearly, based on numerous studies, ED can be considered at least a ‘marker’ for possible further vascular disease or CVD.15 In their report, Vlachopoulos and coworkers make the point that the man presenting with ED, the clinician, is offered an opportunity to attempt to improve the health of the man by addressing lifestyle modification, and consider further vascular evaluation owing to the clear relationship between endothelial dysfunction, ED and CVD.19
It appears that testosterone has NOS-independent pathways as well. In one study, castrated rats were implanted with testosterone pellets and then divided into a group that received an NOS inhibitor (L-nitro-L-arginine methyl ester [L-NAME]) and a control group that received no enzyme.  The castrated rats that were given testosterone pellets and L-NAME still had partial erections, a result suggesting the presence of a pathway independent of NOS activity.
Poor sleep patterns can be a contributing factor for erectile dysfunction, Mucher says. One review published in the journal Brain Research emphasized the intricate relationship between the level of sex hormones like testosterone, sexual function, and sleep, noting that testosterone levels increase with improved sleep, and lower levels are associated with sexual dysfunction. Hormone secretion is controlled by the body’s internal clock, and sleep patterns likely help the body determine when to release certain hormones.
When you become aroused, your brain sends chemical messages to the blood vessels in the penis, causing them to dilate or open, allowing blood to flow into the penis. As the pressure builds, the blood becomes trapped in the corpora cavernosa, keeping the penis erect. If blood flow to the penis is insufficient or if it fails to stay inside the penis, it can lead to erectile dysfunction.
Conditions that may be associated with ED include diabetes, [25, 26, 27] hypertension,  , and CAD, as well as neurologic disorders, endocrinopathies, benign prostatic hyperplasia,  , sleep apnea  , COPD,  and depression (see Table 1 below). [32, 33, 34, 35] In fact, almost any disease may affect erectile function by altering the nervous, vascular, or hormonal systems. Various diseases may produce changes in the smooth muscle tissue of the corpora cavernosa or influence the patient’s psychological mood and behavior.
It happens when they're drunk or when they've taken coke or when the invoice they submitted three months ago still hasn't been paid yet. Usually, they get sober, they get their money, and it passes. But not for all of them—according to 2013 data from the Journal of Sexual Medicine, one out of every four new erectile dysfunction diagnoses is in someone under the age of 40.
Unfortunately, some patients may have an overly simplified understanding of the role of PDE5 inhibitors in ED management. Such patients may not expect or be willing to undergo a long evaluation and testing process to obtain a better understanding of their sexual problem, and they may be less likely to involve their partner in discussing their sexual relationship with the physician. They may expect to obtain medications through a phone call to their doctor or even over the Internet, with minimal or no physician contact at all.
The great majority of ED cases in diabetic men have a physical cause, such as neuropathy or circulatory problems. In some cases, however, the cause of ED is psychological, including depression, guilt, or anxiety. With a thorough exam, the doctor should be able to determine whether the ED is psychological or physical in nature. If the cause is psychological, your doctor may refer you to a psychiatrist, psychologist, sex therapist, or marital counselor. Do not view such a diagnosis as an insult. Most psychologically-based ED is easily and successfully treated.
Given the high risk of priapism during escalation of therapy for intracorporeal injection, it is recommended that the drugs be administered in a supervised office visit initially and that the patient be given a well-articulated plan for treatment of priapism if it occurs. Escalation guidelines for alprostadil alone vary, but a general guideline is to start at 2.5 mcg and increase by 2.5 mcg to a dose of 5 mcg and then in increments of 5 mcg to 10 mcg until an erection sufficient for penetration, not lasting more than 1 hour, is achieved. If there is no response to the initial 2.5-mcg dose, escalation dosing can be slightly more liberal.34 A European prospective trial of PGE1 alone found 91% of the 54 patients completing the 4 years of the study reported good or better tolerability and satisfaction with therapy.35
"For men who are unwilling or unable to self-inject alprostadil, the FDA has approved this dissolvable pellet that can be inserted directly into the urethra, the opening of the penis," says Dr. Feloney. MUSE, with an inspiring name that actually stands for medicated urethral system for erection, will trigger an erection in about 10 minutes that may last as long as an hour. Using MUSE to treat ED can result in somewhat unpleasant side effects, however — including an aching sensation, burning, redness, and minor bleeding.
The primary nerve fibers to the penis are from the dorsal nerve of the penis, a branch of the pudendal nerve. The cavernosal nerves are a part of the autonomic nervous system and incorporate both sympathetic and parasympathetic fibers. They travel posterolaterally along the prostate and enter the corpora cavernosa and corpus spongiosum to regulate blood flow during erection and detumescence. The dorsal somatic nerves are also branches of the pudendal nerves. They are primarily responsible for penile sensation. 
ED is a common occurrence after SCI, occurring in up to 80% of men, and results from disruption of the nerve pathways essential for erection (24,25). Different degrees of ED may occur depending on the spinal cord level of injury (LOI), extent of lesion and timing from injury. Reflexogenic erections can occur with lesions above L3 or L4 when the erectile spinal reflex arc remains intact. Psychogenic erections can occur with low lesions in the sacral and lumbar spinal cord but may not occur in complete lesions above T9 that can damage sympathetic outflow. Additionally, reflexogenic erections are not likely to occur in the spinal shock period that occurs after the initial cord trauma. Conversely, their occurrence may signal that the period of shock is over (26). Typically SCI affects younger men in their “sexual prime” and ED is associated with decreased quality of life (27).
Injections: Injections are a reliable way to restore testosterone levels, but this therapy requires periodic injections (usually every two weeks) to sustain an effective level. It also causes high hormone levels right after the injection and low hormone levels just before the next shot. This is thought to be slightly more risky than other methods that maintain a moderate hormone level throughout the treatment period.
The American Urological Association Guideline on the Management of ED states oral PDE5i are considered first line therapy for the treatment of ED, unless contraindicated (57). Sildenafil, the first oral PDE5i, was introduced in 1998 and has revolutionized ED therapy due to its broad applicability, effectiveness and safety profile. PDE5i work by preventing hydrolysis of cGMP by the PDE5 enzyme in the smooth muscle of the corpora cavernosa. cGMP degradation typically leads to smooth muscle contraction and detumescence prevented by PDE5i administration. Two other PDE5i, vardenafil and tadalafil are other PDE5i with different pharmacokinetics, PDE receptor selectivity and side effect profiles.
Can’t or don’t want to take ED drugs? The vacuum pump method is the next most common choice among men with erectile dysfunction who pass on pills, says Dr. Bennett. To create an erection, you place a plastic cylinder over the penis and pump the air out of the cylinder to force blood to flow into the penis. An elastic ring that you slide onto the base of your penis holds the erection. This ED treatment device is effective for about 75 percent of men. Side effects include numbness, bruising, and weak ejaculation — and the ring must be removed after 30 minutes.
The venous constriction device is a device designed to compress the veins that drain blood flow out of the penis to keep blood in the penis. These devices may help individuals who have a "venous leak." In these individuals, although blood flow is coming into the penis, it is draining out at the same time and this persistent drainage prevents a fully rigid erection. These devices may be used with other forms of medical therapy, such as medications, injection therapy, or the vacuum device.
If PDE-5 inhibitors are not suitable or don’t work, other therapies include injections into the base of the penis, which cause flow of blood into the penis and a fairly immediate erection that lasts around an hour. The drugs injected are alprostadil (Caverject and Erectile dysfunctionex) and Invicorp (VIP and phentolamine). Alprostadil may also be inserted as a gel into the opening of the penis. This is not suitable if your partner is pregnant.