It happened to us early in our relationship. On both sides. (I started to sturggle to orgasm, even after aaaaages of play)
Anyway. As you can probably see the common link so far is "New relationships" of course, that isnt the only time it happens but its probably a common time. Its often not a physical problem, rather a mental "Pressure to perform" thing.
Us ladies are pretty lucky in one sense, if we are not aroused, we can at least hide it better. Me and my guy have talked about this a lot, as it happened to us both we felt empathy with the other and it let us share our feelings.
What I got from him was that it wasn't that he wasn't horny. It is a cycle. It starts off with pressure to perform Think of it like this, some of us women, when in bed for the first time with a new parter, are often not relaxed. maybe we are worrying about our wobbly bits, or how our vagina looks, or will he notice one boob is bigger or does he think I smell or taste weird...etc etc. Anyway, men think similar. Worrying about performing and being good and pleasuring you is on his mind most at the early stage and because of this, he looks down.....oh no. Erection is gone. Totally panic sets in and he feels totally crap inside. His confidence knocked.
Then comes round two, the first occasion has passed and now it is in his head "Shit what if I have a problem, what if I can't get hard again, or lose it" What happens? Worry = lost it.
Performance anxierty also hit me. I went through 3 months of being unable to cum, even after hours, and even after I used to cum no problem with him before, simply because of that cycle I mention above...."What if it happens again"
When you are so focused on "The problem" you actually make it worse.
The way to overcome it is to not be thinking or worrying about it and to relax. This is easier said than done, trust me. I KNEW this was the solution right from the start of my problem, but actually trying to relax and not think about the big elephant in the room is hard. Eventually both myself and my partner grew closer, talked about it, I reassured him I don't care and he reassured me (Although both of us didnt take any solice from that) Eventually it slowly came back for us both. As we got closer and more relaxed around each other.
The problem is, I don't know how to advise you. One one hand I want to say bring it up, reassure him you don't care, its not a physical issue, its just a cycle of worry and everything is fine and to take his time etc. On the other hand, sometimes bringing it to attention might make it worse. It depends on the person.
This problem is quite common btw. x