This is an old experience. somewhat scary yet interesting...
I think I had a few experiences of something that is maybe sleep paralysis. It was a bunch of times when I was in college. I was dozing off in bed when I heard a knock on the door. I could see the door but was completely incapable of even getting off the bed. It was lousy because I used to try very hard to move until I was just fed up. After a while or so, I used to snap out of it. when I woke up a while later (and could move my limbs) I once noticed that the bed was in a different position altogether. This is how I realized that it was maybe some kind of a dream.
I had this exact same experience about 4 or 5 times. And it never felt like a dream.
As in I always thought my eyes were open since I could see the room, the bed, myself in it,
and the door in front of me.
I was never able to ascertain if someone did knock on the door.
In such a case, MAYBE this happened cause my mind(awareness) jerked to consciousness while the body was still asleep. [*sceptic]
I have read about such experiences though.
Apparently, there is a normal mechanism of paralysis that occurs when one is in deep sleep.
They say it is useful because it prevents physical movements (for most people) during a dream.