He wouldn’t. Which means despite what seems to be, there IS a reason. It may not be apparent to you, or you may not want to admit what it could be, but guys tend to function pretty logically unless they’re insane, drunk, or fighting for the love of a woman. One time all three (we miss you, Uncle Gerry).
Maybe he was really interested, but then you had sex and now he’s not because he’s a tool. Or maybe you went on a date and he realized he hates your guts because you like Justin Bieber or fart too much or not enough.
Maybe it’s the ever-hoped-for “unrelated thing,” meaning his parents are stressing him out or his favorite baseball team all quit or something else that will blow over if you just give him some space.
In any case, all you can really do is give him some space or confront him about it, and I’d vote for the former, both because I think it’s the right thing to do and because I think it’s the easiest thing to do. Sometimes they are one and the same.
If he’s not interested anymore, aggressively courting him generally won’t re-ignite said interest. Better to accept that “something happened,” and it’s probably not going to work out, at least not for the time being.
Give him space, and observe. If he shows interest again down the line, maybe ask him “what was all that, then?” preferably in an adorable cockney accent. If not, try and accept that he may have simply changed his mind.