S.W.
Oh boy, does that sound familiar! Reading your note brought back so many fond memories of that time. :) I really don't think there's one way to get him to stay in bed - all kids are different and you may need to try different things and see what he responds to. Try and be patient as difficult as that can be, believe me.
I tried putting the door knob covers on my son's door but as he got older he got very freaked out by it and to this day (he's 5) he hates having his door closed. Instead we put a baby gate in the doorway as a reminder he was to stay put. He had a CD player to play lullabyes and a few board books and toys in his room to keep him busy if he got up early. If he would come out of his room (which was a lot at bedtime) I would just walk him back to his bed. I put him to bed earlier, read stories and laid down with him for a bit. We would also have lots of talks and he would tell me about his day - really great bonding time for the two of us. I would give him warning before I left and would remind him that he needs to stay in bed. Each time he would come out of his room I would put him back, we would do this over and over again until he was satisfied that the boundaries were staying put, then he gave up.
It really can be a challenging and frustrating time. Whatever you choose, be consistent, calm, and firm and eventually he'll understand. It'll be over soon enough! :)
Good luck!
S.