bruh this happened to me once but instead of being in a closet I literally walked from my bed out for my room and walked so far until I went in my parent's room and slept there
if it was demons, burn the house down and move to a different continent where they have totally different religions so that you can be safe from that religeon's demon. if it was sleepwalking, restrain yourself with chains.
i have walked all the way upstairs asleep to get another blanket when i was asleep and my dad asked me what was doing i told him i was getting a blanket (long story short the blanket got taken away