I have had two, one as a child when my mother died, and another when I had a really high fever in the Far East. I have posted this on here before, but I will again as it is quite relevant to the OP.
It is to with the way our brain works, which probably isn’t how most imagine. Our senses take in the surroundings and recreate those surroundings in our brain. Our brain then puts us inside those surroundings it has created, so basically it’s like we live in a video game in our brain. That is why it takes a child so long to learn to walk – positioning ourselves in our brain is a very hard task to learn, whereas a child’s growing brain could master the art of walking in no time. That is also why we have out-of-body experiences as the brain can lose its ability to put us in the right place, through severe shock for example. The most common place to go when we lose our position is the ceiling and we look down on ourselves, but we can go anywhere.