Some amount of erectile dysfunction(ED) is considered a normal part of aging but is not necessarily true. One needs to be proactive in order to avoid age related problems in erection.
1) Watch what you are putting in your mouth : The diet which is bad for your heart will also kill your erection faster. The reason is penis needs to be full of blood in order to become hard and erect. If you have clogged arteries all over your body, chances are that the same thing would have happened to your penis as well. If your arteries are lined by cholesterol and are carrying less blood, it will automatically result in a poor erection. A diet rich in fruits, vegetables in natural form, fish and healthy oils is likely to improve your sexual health.
2) Keep your blood pressure, cholesterol and weight in the healthy range: With high body weight, comes diabetes and the resultant nerve damage can cause less sensations of the skin of penis. Similarly, high blood pressure and cholesterol can damage the blood vessels that supply to the penis causing ED. Some blood pressure medicines are also likely to reduce erections so you must check with the doctor if you are on BP medicines and are facing ED.
3) Keep alcohol intake low: high alcohol intake can cause liver and nerve damage and eventually in the long run cause erectile dysfunction.
4) Exercise regularly : any form of exercise, walking, yoga, treadmill, cross trainer etc would do. However you must be cautious against injuring your groin area during exercise. Cycling specially may cause injury to the pelvic nerves and adequate protection must be taken to reduce harm. One can wear pads or avoid long nosed bicycles or get up in between stretches of exercise. Kegel exercises are good for reducing urinary incontinence in both men and women but may not be very helpful in giving you a good erection.
5) Avoid anabolic steroids and smoking : People who take too much of steroids for muscle building and stamina eventually end up having poor sex as steroids can actually shrink up your testicles, thus leaving you with less testosterone, the hormone which can give you a good sex drive. Smoke less, be stress free and enjoy good sex.