We just slept together but he was acting weird, what was in his mind?

We're friends a couple of months now and I have a relationship with someone else, before I met him. One night he went out with our friends to drink and after that we went to one guys house. We were all extremely tired because it was really late and he laid on my laps, once again. He slept on them and I closed my eyes too. After a while everyone left and me him and the guy that lived there stayed bc we wanted to sleep there. We were really tired. Also the guy that was laying on my laps lived next door. I laid on the couch to sleep and he laid next to me. He asked me to continue massaging his head and came really close to me, like he was facing my neck. We slept together and he had me in his arms, like couples do. Also he was petting and it was obvious that didn't want me to leave from his arms. I really liked this but as I said I was not single. He did different things like holding my hands etc. However the next morning he was teasing me about that bc our friend saw us and found that really weird. The thing is that he's doing things like that mostly when we're alone..
We just slept together but he was acting weird, what was in his mind?
Post Opinion