I think your husband is just suffering from so-called 'performance anxiety'. If he has no trouble maintaining an erection & ejaculating during masturbation then it's not a physical problem. (By the way, please don't react badly if he masturbates - most married guys still do at least occasionally & it's no reflection on you or how attracted he is to you). I have had issues in the past where if I focused too much on my own 'performance' (getting an erection, keeping it, lasting long enough before ejaculating, etc.), suddenly all the fun & pleasure is gone & now it's become more about judging my own performance. And I also had times where I was deliberately trying to hold off ejaculating to make it last longer, and then after awhile, I was still hard but my penis became sort of 'numb' & then I couldn't get off. And the sad thing is, it does happen to most guys at one time or another, maybe we're stressed or something & just don't have a very satisfying sexual encounter, then we start worrying about it & getting nervous that it's gonna happen again & then we're 'spectating' - paying too much attention to what's going on with us instead of relaxing & enjoying the moment. It probably did NOT help that you got upset with him - that's the worst thing you could do. Believe me, he already felt bad about not performing well in bed! It's probably not his fault, in fact, a lot of the time this stuff happens because many guys are trying too hard to please their wife or GF. So lighten up, tell him it's OK, both of you just need to relax & remember - good sex doesn't always have to be intercourse - there are many ways to please each other & if you try some different things you may find the other stuff gets back to normal once both of you are more comfortable & relaxed. Best wishes to you both...
Has anything his life had a dramatic change? Did he lose a loved one, changed job`s etc? Has he started a new medication or recently have you had a child recently? Do you think he could be cheating? Have u gained/lost alotta weight lately? You may have to rule several things out to get closer to the reason. Couples therapy if this continues? Good luck!