It’s called hypnopompic hallucination.
Unlike with sleep paralysis, you can move and talk while still seeing it and it will last a few seconds up to a minute which can seem like an eternity.
It usually fades as soon as you turn on the light, but for some very few people it does not and persists even after turning on the light.
Here’s an example of someone who often experiences these and has started recording themselves: https://youtu.be/bEMGZNvETMQ
Why YSK: because it’s very scary and unsettling when it happens and since you can move you don’t believe it’s sleep paralysis and can’t explain it. This might explain many of the “monster or spirit at the foot of my bed” sightings that we often hear mentioned in horror podcasts.
Huh I wonder if this is what happened to me a few weeks ago. I “woke up” I was sitting in my bed and there was this large squirming mass in my closet. It’s hard to describe but think millions of worms. It was moving towards me. I moved to the other side of my bed and could see things moving on the floor. These worms were also coming through the (concrete) walls. I then shot awake screaming while waking up. Turned on the lights and saw nothing. It is the strangest and scariest thing I’ve ever had happen while sleeping