I have a 2 yr old who was booted from her crib into a toddler bed at 20 months due to the arrival of a new baby. After almost 6 months of her being able to get out of bed by herself, we've tried all kinds of things. We started with leaving her door open so she didn't freak that she was in there by herself. We allowed her to be able to come and go between her room and ours as she needed. She would get in bed with us, stay for a little while, and go back to hers eventually. It was like a game to her. I could hear her giggling on her way back to her room. We let this go on for about a week, but by then she was starting to turn on the tv at 4am and that was a little much for me. Then I started to close the door after an hour. I would put her in to bed by 8, leave the door ajar, and then tell her to go back to bed (NICELY and SOFTLY) every time she got up. By 9 she would usually be in there to stay, adn by the time I went to bed I would close the door so she couldn't wander the house while I was sleeping. After a few weeks of that, we just started closing the door when we put her in there. She would come to the door and start to cry adn yell. The first couple nights were the worst! Be prepared for a couple of bad nights just to get things started. I sat at the bedroom door - on the outside so she couldn't see me, and every time she came to the door crying and trying to open it, I CALMLY told her it was "Night-night and time to go to bed. Get back in bed please." The first night this lasted until 11pm. The next night until 10pm. Now I just have to give her a few reminders and it only lasts about 10 minutes - and it's not hysterical crying, just a little whine sometimes. She just needs to be able to hear that I'm still out there, even though she can't see me. As for waking up in the middle of the night, she still does that too. We've had to do the same thing as the night routine. Start slowly with consoling them in their bed, stay for a few minutes, then leave to the outside of the door. Keep reminding them that it is still night and they need to go back to bed. After a few days, they should get it and it should get easier - hopefully. And it is ok for them to cry - they will put themselves back to bed when they are done - they've just gotten themselves into a routine that they know we will come and get them and they get to be awake, watch tv, cuddle. Yeah, you feel loved, but by morning when you're exhausted you're not able to spread the love. :)
Hope this helps.