My best friend tried to kiss me whilst drunk! Wtf!πŸ˜“πŸ˜“

Been friends for over a year, we had a lot of sexual tention but realised it wasn't right for a few reasons. Recently he got a girlfriend which I was very proud of him for that. She broke his heart. He went out and got verryy drunk and sniffed coke.Β 
He called me because he was in despair so I meet him at 3am. He tells me what happened and as his best friend, I'm there supporting him. He's crying all the time, we're hugging all the time, I'm trying to give him hope. He keeps telling you're so lovely, I've never had a friend like you, you're the only one I can talk to, you're so chill. He keeps staring at me and its so weirrddd.
I take him back to his to put him to bed safely before he does anything reckless. But he's taking me into his room, he puts his head on my lap. From that point I knew I had to leave. I knee what it was goong to lead to. I tell him I'm going and he gets upset.
I close the door but he calls me back. When I opennthe door, he's standing and walking towards me and close the door behind him. We're in the corridor and its pitch black. He keeps telling dont go, I dont want you to go please. As he's saying this he's holding my hands and staring at me, he hugs me but this hug feels different. More intimate. As he lets go he trieds to move his face closer to mine. I turn my head. We're staring and staring until he grabs my hand that he has been playing with and leads me to the door understanding that I'm not going to kiss him or have sex with him.
Why would he do that?? Subconscious, drunkness?? Do you think it was because I was there for him and he translated those emotion to that?