My sister did this for a while (sometime between ages 4 and 6). It would freak my parents out, because there were a few times that they had a hard time finding her. One time they found her inside of our toy box in the play room. She had taken all of the toys out of the box and climbed in it. Another time she was between the couch and the wall in the living room. She was under the bed alot. One time they found her asleep on our enclosed porch under a chair. They thought she was sleep walking. She, later in life, told me that she would wake up in the middle of the night and not be able to go back to sleep. So she would get up to play and would fall asleep.
They wound up putting her in the same room with me and that pretty much stopped it. They got us bunk beds and she slept on the bottom. So now I sometimes wonder if it was the need she felt to be enclosed, when I look at some of the places where she would be found. A bunk bed kind of has that feel to it when you sleep on the bottom of it. She had me in the room and had the enclosed feeling and it made her feel safe.
My daughter likes to go under the bed or comes in the room with me. Same type of thing.
Something to think about. Good Luck!