D.W.
Locking him in his room is prbably the worst thing you could do, it'll scare him and make him NEVER want to stay in his room. If you just keep putting him back in his bed at night when he wanders out, he'll finally get tired and realize he needs to be in bed. It may take a while, but once he learns it's not likely he'll start it up again.