It's time to give him a twin bed so that he is safe when he will, inevitably, climb out L.. Punishment won't work on a two year old ~ nurturing will.
So you are going to have twins soon... now more than ever a sweet and loving bedtime routine that ensures he is asleep before you leave the room will help him to stay in bed. Consider the following:
Children need their brain activity to slow down in order to calm down their bodies for a good night's sleep:
Pick out CHAPTER books that are calm but interesting: Winnie the Pooh, Francis, Little Bear (boys LOVE Little Bear). Tuck him into bed ("the story won't start until you are tucked in...") and sit by the bed (or in it) and read aloud, slowly and softly.
Show him the pictures if you want to but don't let him touch the book - this is story time and he needs to create the pictures in his head.
He will most likely fall asleep before you are done reading for the night, of course, so try to remember where you left off.
If he doesn't fall asleep before the end of he chapter, read another OR sing him a sweet bedtime song or two. Mom's bedtime songs are the best! If you feel you can't sing, bring a tape/cd player into the room and put on quiet word-free music. He'll love falling asleep with the music and the images of his new book friends in his head.
Also, get him into the habit of choosing one of his favorite stuffed animals or dolls to listen to the story with him in his bed so he has a story buddy. He may change animals/dolls with every story, or may choose the same one for an eternity. This will be the last thing he will do before climbing into bed... knowing that his friend is missing the story will give him a feeling of importance and reverence.
Now HE is in charge of someone else who NEEDS him to be in bed in order to have their own good bedtime experience. When he has someone to sleep with and nurture, his bed will become an important place for him to be.