We've always put a stairgate across the corridor at night so that Ds2 can get to the bathroom but not wander the rest of the house. Three days ago we had to use the stairgate for something else (long boring story) so left it off. He wandered a bit, but didn't come downstairs. The next night he got into bed with DS1 at one point, but went back to his room when asked (after Ds1 got fed up with being hugged!). Tonight we left him with a babysitter and he was fine. In fact I think he's going to sleep more quickly.
It's a small thing but it feels like a big thing! I was beginning to wonder what would happen when he could step over the damned thing 