E.N.
My first one did the same thing. He was sleeping in zipper jammies and I used a diaper pin to pin his knees together for a few nights. After a few days he forgot he could get out, I had to do this a few different times before we moved him into a toddler bed but it was weeks sometimes even a few months in between escape attempts. He is 10 now and climbs everything he possably can. Good luck!
E.