As is true in so many medical conditions, lifestyle modifications, considered first-line therapy, can have a salutary effect in ED management, and men should be encouraged to make the necessary changes to the benefit of their sexual function and to their overall health as well. Despite the benefits of behaviour modification, men presenting with ED want the physician to help with measures that can have an immediate impact.
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. 
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