For many men, there is no direct factor involved in erectile dysfunction other than the natural process or aging. As men age, the testosterone hormone decreases in productivity and circulation. Basically, the body is saying that the man has done his job, especially if he has had children. During this time of drawdown on testosterone, men may experience weaker erections, more difficulty in achieving erections, and more difficulty in maintaining erections.
The main medical causes of erectile dysfunction are based around poor blood flow (due to furring of the arteries thanks to raised cholesterol or high blood pressure), poor nerve supply caused by diabetes-related nerve damage, or low testosterone as a result of obesity, old age or failing gonads. We doctors get just as concerned with men who have variable erections as well as those that can't get an erection at all. Failing to get an erection occasionally is pretty normal as you get older. But if you have unreliable erections for a prolonged period of time – more than six months – this could suggest an early sign of physical problems such as cardiovascular disease or diabetes which could develop further so get yourself checked out.
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