This can just happen. I went through a patch of it happening (it was what first prompted me to join Medhelp), although I was a bit older. I was (still am!) fit, stong, non-smoker, light drinker, not over-weight, no other health issues.
It would only happen during sex - during this phase I was still able to masturbate without any problems. So the problem had to be mental, not physical. But it wasn't like the sex had suddenly stopped being good, or I felt any differently about my wife. It just happened, and I still have no idea what prompted it, but I can say for certain it was nothing my wife did or didn't do that caused it.
He's probably way more devasted about this than you are. It's a big blow to the ego. And that's half the problem right there - as soon as you start having that question mark in your head, you start worrying that you might go soft, BOOM, that worrying makes you go soft! It's a bad feedback loop.
So the best thing you can do to help him (and indeed help yourself, because you don't want this happening again), is to re-assure him. Don't make a big deal about it. Don't talk about it before sex. Anything that damages his confidence further will make the problem worse.
Also, if you can detect him starting to go soft, you could try switching to oral or masturbating him, that might perk him up again. Don't make it seem like you are only doing it to avoid him going soft, make out like you are just taking the initiative and fancied changing position and doing something else for a few minutes.
Finally, if (like me) he can still masturbate successfully, then finish the session off that way. Invite him to do it himself, tell him you'd like to watch (and do yourself at the same time, why not?). Or do it to him. Or tell him you want him to do it himself and spray it over your body. Again, try to make it part of the whole sex session, rather than him simply finishing off on his own because he can't do it inside you - if it's fun it'll help build his confidence, if it just seems like he is finishing off on his own without you being part of it it'll be depressing and further damage his confidence.
Hope some of these ideas are of some help to you.
i think it is normal, and it has many reasons but i think all the points well go on the mental and emotional mode he is at this momment
I have suffered on and off from erectile dysfunction since before I was 19, so unfortunately it is never to early for that.
Try not to feel so devastated about it. Instead try to have compassion for him, as it is usually worse for him than you.
I dont have all the statistics at my finger tips, but I would guess that if he is in good health then the issue is in his head.
I dont know him or you, so I could give you the typical list of guesses why it happened...
1. Anxiety
2. Stress
3. Exhaustion
4. Illness
5. Depression
6. Alcohol / drugs
7. Self conscious
Good luck and I hope you are practicing Safe Sex!