When you go to sleep at night and start dreaming, your brain goes into a special state called "REM sleep" where your body is relaxed and your mind is active. When you wake up in the morning, your brain goes through a process called "hypnopompic," which is just a big word that means waking up from sleep.
During hypnopompic, your brain is still a little bit asleep and can sometimes make you see or hear things that aren't really there. Have you ever woken up and seen a scary monster in your room, but then realized it was just a coat hanging up or something? That's an example of hypnopompic.
This state can also make you feel groggy or confused when you first wake up, because your brain is adjusting from the dreaming state to being fully awake. But don't worry, it's totally normal and happens to everyone!