I’ve had similar things as a child (normally related to overheating in bed) and a couple of times as an adult due to anxiety. Your brain hasn’t totally woken up and you’re still dreaming whilst your senses are working. We all know dreams incorporate what’s going on around us (Hence the joke about eating giant marshmallows in your dreams and the waking to find your pillows have gone), but rarely is sight involved.
It’s really freaky, rather disturbing, but nothing to worry about. Just get better sleep.