It's happened to me a few times before. It's extremely weird. I wake up and it seems as if during the dream I could kind of see what was going on in the room I was laying in. I'm not sure.
It usually happens in the day after I've stayed up all night.