Waking up disassociated

Sometimes I just wake up in the middle of the night disassociated. It happened a handful of times in January but not since until last night… in January it was more after I went to sleep, I’d wake up around midnight to 2 and feel disconnected from my surroundings, confused about what was in my head, I’d even get weirdly dizzy when I closed my eyes so I’d get up to use the bathroom and then go back and lay down until I fell asleep and I’d be fine in the morning. Last night I was watching twitch and Instagram reels in bed and then all I remember is feeling that same thing, realizing I must have dozed off for an hour I was so thrown off, felt disconnected from everything, went to the bathroom and tried to focus on my phone but didn’t feel better. Went back to bed and eventually felt myself coming back to reality thankfully… idk why this happens or if anything causes it other than maybe waking up at the wrong time… any thoughts on this?