We are just about to put our DS into a bed. I heard a good tip from a sleep nurse. Most kids aren't bothered about whether the door is open or not. But she recommended shifting the focus to the door. Tell him if he gets out of bed, then the door is shut, if he stays and lies down, the door stays open. Being 2 everything is a battle of wills and they will want to get the upperhand. So suddenly they do care about the door being open because you have bartered with him and will (hopefully) stay put to get his own way.

I don't know if it will work but she said it had worked for other families.