Damage to the autonomic pathways innervating the penis may eliminate "psychogenic" erection initiated by the central nervous system. Lesions of the somatic nervous pathways may impair reflexogenic erections and may interrupt tactile sensation needed to maintain psychogenic erections. Spinal cord lesions may produce varying degrees of erectile failure depending on the location and completeness of the lesions. Not only do traumatic lesions affect erectile ability, but disorders leading to peripheral neuropathy may impair neuronal innervation of the penis or of the sensory afferents. The endocrine system itself, particularly the production of androgens, appears to play a role in regulating sexual interest, and may also play a role in erectile function.
It's definitely possible that your boner isn't cooperating because it's not really thrilled to be there. Maybe you're not sure about this partner, you're worried about pregnancy or STIs, you're not feeling comfortable with an unfamiliar hookup, or you typically need some other kind of stimulus to get in the mood. It's always worth checking in with yourself to see if one of these factors might be holding you back in bed, says Skyler. If you have a hunch that it's because you're doing something you don't want to do (or you're not doing something you do want to do) pay attention to that hunch.
It is important to understand that ED is frequently, if not usually, directly related to endothelial dysfunction, and that the release of NO by the vasculature of the penile arteries is directly related to the function of intact, healthy endothelium. In the face of endothelial dysfunction, the process of erection fails to occur in a normal fashion.16
Qaseem, A., Snow, V., Denberg, T. D., Casey, D. E., Forciea, M. A., Owens, D. K., & Shekelle, P. (2009). Hormonal testing and pharmacologic treatment of erectile dysfunction: A clinical practice guideline from the American College of Physicians. Annals of internal medicine, 151(9), 639-649. Retrieved from http://annals.org/aim/article/745155/hormonal-testing-pharmacologic-treatment-erectile-dysfunction-clinical-practice-guideline-from