It's just sleep paralysis. A common phenomena. I get it about once a month or so. Sometimes I hear weird noises and see flashes of light, plus it generally happens just as you're coming out of a dream (it's caused by your brain paralyzing your body so you don't act out your dreams, usually you wake up after the effect has worn off). So it's very easy to be quite disoriented.
First time it ever happened it was scary as hell. Now I just wake up and think "dammit, this crap again, time to wait for a few seconds so I can move again and get back to sleep".
EDIT: Oh the other day I had a weird one. I dreamt I was having sleep paralysis. I "woke up" in the dream lying in a really weird position with my legs half off the bed, and couldn't move for about 30 seconds. Then I woke up for real and was lying normally on the bed. That sure was confusing!