i see nothing wrong with locking him in the bathroom, he could play in the bathtub, or maybe the stuff in your medicine cabinet [i'm joking people]
i don't have kids, i don't like kids, but for some reason kids are drawn to me. [same with animals] you could try the silent game or something where they have to sit still and be quiet to win a prize. you could put on a movie, do arts and crafts, go for a walk, play outside, oh! make a blanket fort, still love those XD
magically... you could try zapping some of the kids energy psi vampire style... burn some lavender incense, it has a soothing effect.
in regards to the room that out of bounds, you could buy a lock for the door, or [what i'd do, but i'm not one for kids remember] tell him a scary story about the room. something like there's a ghost that's trapped in that room that eats little boys or something along those lines. just a thought, but that's a last option type thing, don't want him terrified and telling his parents. [not sure how old he is, i'm thinking 3-5 range]