Speaking for myself, I was going through a tough period at work awhile back and had a lot of things on my mind. I would easily get distracted from sex and my erections were softer and at times it seemed as if I was disinterested during sex. Along with the stress from work, now I had “performance anxiety.” I started to worry about not being as strong as I use to be, I worried about what my wife was thinking (Is it me?) and I started worring about my lack of interest. I also had not worked out in a week or so. Everything compounded. Talking about my stress, thoughts and fears with my wife helped a lot. Then getting back into the gym helped reduce my stress and increased my testosterone, thus my erections become strong again.
By having a healthy lifestyle your body will reward you. You will feel better, you will look better and best of all you will perform better. Eat right. Reduce your fats. Balance your carbs and proteins to what suits you best. And finally, get lots of rest.
Another question for you: do you get nocturnal erections and/or wake up with morning wood?