If you are not 40 yet you may want to speak to your doctor. Things that can directly affect your erection:
1. Not getting enough sleep
2. Not drinking enough water
3. Not eating a healthy diet (stick to fruits, veggies, lean meats, beans, whole grains)
4. Alcohol. NO!!! Stay away from the joy stick poison. Any drugs can do damage to the bean pole, fyi.
5. High blood pressure/high cholesterol (ask your doctor)
6. Being over weight
7. Strength training is good but also just taking a 30 min walk a day can clear your mind
The only question I would have is if you can maintain an erection when you are masturbating. If you can maintain an erection while masturbating and are able to have an orgasm it may not be physical but more of a mental concern.
Please be aware I am NOT a doctor and only play one when being paid and wearing a skimpy outfit.
Best of luck!!!
Scarlet