J.C.
When my son was about 1 1/2, he decided to start getting out of bed over and over. I laid on the floor outside his bedroom door and everytime I saw his feet start to come out over the edge of his bed, I opened the door, said "no", put him back in his bed, and walked out the door. I did this over and over and over and over and over the first time, but the second time was a tiny bit less, the third time was even less, and after a few days, he got the hint. He finally gave up because I was totally consistent. Those days sucked because I literally was laying on the floor outside his bedroom for like 2 hours, but well worth it in the end because he stopped trying to get out of bed. It's about following through, being consistent, and not getting into a conversation with him while you're in there.