Marcus Gray, 19, from Oxford, was out partying on Saturday to celebrate his friend's last night at home before going travelling to Thailand.
In the early hours at around 4am, Marcus, who works in a clothes shop, sent a text to his friend Alex asking him: "Are you in town?"
Then when he got home, before stumbling into bed, he checked his messages and replied to himself: "Nah mate I'm home now."
The next morning he awoke blurry-eyed to discovered his hilarious mix-up and posted it on Twitter - where it was retweeted more than 11,000 times and favourited 15,000 times.
Marcus told the Mirror: "It was a pretty normal night we had a good few drinks then before I left I sent Alex a text to see if he was still out.
"Later on when I got home I was obviously still drunk and replied to myself.
"It was only the next morning when I got up that I realised what I had done and how stupid I was!
"I showed my friends and they were all laughing so I thought I'd just put it on Twitter - it's crazy how it's exploded!"
But his parents don't seem to be as impressed as Marcus's mates, as he pointed out...