Let me just say, not everyone is going to like what I do say, even less will believe me. But, I am used to being criticized and not believed, and I believe in speaking the truth and my mind.
I have 2 theories to share with you, being it wasn't me that it happened to, we can all only have theories.
#1 - you awoke from REM sleep with a dream still playing in front of your eyes. This happens to me and I have a similar reaction, unable to move and seeing things that aren't really there.
#2 - I've been dealing with spirits since I was a baby, it still freaks my mother out when we talk about what used to happen when I was very young. It is a possibility it was a spirit, but of he just stood there, he was simply observing you. You very well could have been paralyzed be fear for a few moments, it happens to me all the time, still.
There is my opinion. Good luck, don't be frightened and Blessed be.