I have just been through something similar. I was horrified when my son starting escaping but in reality, we got into a new "big boys bed" routine within a few days and now have no problems.
Firstly I would advise buying a children's book on 'my big boys bed' - there are a few around to choose from. Reading the book to my son helped him understand that he was now old enough to sleep in a big boys bed (cot with side off) and not his cot. It made it seem like an exciting change for him.
Secondly, and this will take some work perhaps, be consistent with the routine. We maintained the exact same bedtime routine as before (bath, story, into bed) but clearly it doesn't take long for them to realise that they can get out of bed themselves. We gently explained to our son that he shouldn't get out of bed without mummy or daddy as it was dangerous (it actually is dangerous in our house so this was important) and that when we said good night it was time to sleep in his big bed. The first night was the worst of all and I think he got out about 50 times in the space of 30minutes!! I sat outside of his bedroom door and every time he came out I would gently tell him "it's bed time now" and put him back into bed. He thought is was great fun initially, coming out and seeing Mummy there but after an hour or so, he got quite upset. Eventually, after many, many more escapes he stayed in his bed and fell asleep. The next night was similar but better, and after that he just got it and we've never had any escapes since. Consistently is the rule here!! If he gets out, he goes back in, mummy comes out of the room - no discussion.
Even now, a few months on, we do not encourage him to get out of his bed alone. We ask him to wait for mummy or daddy to get him. This is mostly due to our highly dangerous staircase but is a useful rule nevertheless.
I hope you have similar luck! All the best!