A typical ritual involves a snack, bath and teeth brushing, story time, then to bed. Let him have some control by allowing him to leave his bedside light on and look at books until he's ready to fall asleep. It is very common for children who sleep alone to get up during the night. If he has a sibling, consider having them share a room, then when he wakens at night, he's not alone. He may be having nightmares or just waking and feeling very alone in the dark.
Some families just have a sleeping bag on the floor for lonely or frightened children.
Don't even think about locking him in his room. Imagine if he wakens at night and he's sick or frightened and the very people he desperately needs have locked him away from them. It's also a safety concern. If there were an emergency, like a fire, having him in a locked room would be dangerous. My daughter is no longer considered a child.