Sleepwalking sex

Last night, I was at a hotel with my boyfriend  for a night and before we went to sleep we had sex but he didn't finish because I got super sore and started hurting. He was a bit upset but we continued to go to sleep. At 3 am I woke up to my boyfriend touching me and trying to thrust himself into me from the back ( he was very hard) . He was groping my breasts and trying to get me aroused. I tried to get away from his grip but he didn't let me go. The problem is that... He was completely asleep while doing it all. It was like sleepwalking sex. I woke him up and obviously he woke up confused and in shock  and he has no recollection of doing any of that. 
This has happened once before a few months back when I didn't want to have sex with him. His body tried to have  sleepwalking sex .  Lol I'm guessing it's his subconscious being  horny?
Does anyone have a theory or have prior experience ?