Half asleep? Daydreaming?

Angelina

Sometimes when I’m just laying in bed, I’d need to go to the bathroom but I feel like I can’t move or my body is glued to the bed or simply because I don’t want to and then I suddenly walk up over to my bathroom, do my business, and when I’m not even done yet I snap back to real life, still laying in bed, and I’ll have that same... “dream, daydream” or whatever. One time it happened about four times before I actually peed in my bed before. Does anyone know what this is called? Was I daydreaming or was I half asleep or was it all a dream?