Sounds similar to a lucid dream but probably just to a different effect. I have experienced both to a degree. Look up Alice in wonderland syndrome. Any help?
When you're brain cycles on and off there's a startup and power off time just like a computer(creepy if you watch and understand the perception of reality vid on YT) during this on off cycle is when you may begin to lucid dream. What you may have remembered as seeing a entity could have just been part of a lucid dream.
I have also been tired/stressed recently laying in my car waiting 15 hours for undefined reasons, in the middle of the day it got hot and I had at one point full function of my brain but could not move my body, I thought to myself "I'm getting sunburned" "ew I'm sweating" "ok im going to get up now" "okay in 3,2,1" but couldn't find the strength for what seemed like an hour, after finally being up I relised it had been no longer than 30 seconds.