My son has a habit of not wanting to go to bed, but he doesn't leave his room. Instead he likes to give his parents heart attacks in his effort to reach out to us. Even when we know his hand is there, still to turn around and see a hand sticking out of the door, makes your heart jump in fear.
Sometimes he falls asleep like this. But we move him back to his bed before we go to bed, because it makes it rather challenging to open the door. My husband always makes sure to go to bed with all walk ways clear in case of an emergency.