Serious Question That Needs An Answer

Okay so this will be a little long but please read if you like..or want to help

Background:

I have a friend named “John”. John is gay, he has had a boyfriend at one point in his life and came out to everyone 2 years ago. When I first saw him in highschool, I thought he was straight and I had a slight crush on him but I didn’t really care that much. Later on we developed a friend group of “John” me and “Mary”. Our age range is 17-19

current background (recent): Recently, John suggested we come out to his moms for the weekend to hang out, ride quads, get lit, and just explore. (Don’t wanna give too much background to landscape for privacy reasons.) So after sorting out plans last second, we made it to his moms and everyone knows he’s gay and even I do. He doesn’t think he’s bi but he has expressed to me and only me that sometimes he wants to kiss “Mary” because she is so pretty and I get that! Completely lol I mean that’s one thing so Ive never had doubts that he’s 100% gay until last night.

Situation: Late hours roll around at his moms and we all start to fall asleep in one bed(bad idea room wise and —->) mainly Mary and I and John was playing gta5 til he fell asleep with the controller in his hand. How’d I know? Well I woke up at a around 12am because we still had music playing and I noticed he fell asleep playing so I took the controller out of his hand and knocked the fuck back out to sleep. I didn’t care that we all slept side by side because we’re friends and it’s like whatever but something happened. Around 2am I woke up to John tracing his hand up my waist and practically spooning me (ig I flipped to my side at some point) I said “dude John stop wtf” he didn’t say anything and I had to move his arm. He was all jumpy and mumbling then I realized he was actually in this sleep state of doing this!!! If he did it consciously then well my question would be answered but what I’m wondering is, do you think this its him just sleeping all weird and dreaming gay shit lol or do you think in his sleep state he was thinking about me or something or whatever and was trying to get close because he last knew that I fell asleep next to him?

Other notes: we were all pretty comfortable with each other I mean we’ve all seen each other in bath suits and practically squished on the bed in our pjs. Through out the night he would still get close to me and move around and at one point I remember feeling his hand on my ass but that changes because I just put his hand back to his side lol

So any input people could give? I’m having a hard time understanding this situation.