My sis had a problem with her dd where she would get up in the middle of the night and just go sit in the kitchen, or go and play somewhere.
LOL, sorry a little OT but, when I used to go to bed and kiss DD goodnight she would never be in her room and I would have to search the house for her, she would be asleep in the bathroom or under the bed, one night I could not find her anywhere till I heard snoring coming from the WIR and she was asleep against the door (which opened inwards) and I couldn't get in! Ended up poking her through the gap till she woke up lol!

So yes, I think maybe a gate over the door is a good idea!