You'll have to gate his door so he can't get out of the room and roam the house unsupervised at night. I'm sure his room is already childproofed, but make another survey of it to be 100% sure there is nothing he can harm himself on.
You can be sure he'll get out of bed during the night, but hopefully won't get out of the room.
This situation is brought on by necessity. In normal circumstances it would never be recommended to make this transition at such a young age. It's almost to be expected that you may encounter some problem, and all you can really do is set very firm limits and pursue them. The problem with what's happening is that you are facing your son with a situation that is not appropriate to his stage of development. But, it's a less-than-perfect world and you're doing what you are forced by necessity to do.