N.F.
I have a little stained glass snail light on a timer in my son's room. We tell him that when it's on, he has to stay in his room (except for bathroom and emergencies). Most of the time this works. If he does come to my bed at three a.m. I quietly escort him to his room and comfort him back in his own bed. Usually he goes right back to sleep, but if he protests my leaving him, I explain that mommy needs her rest, too and he has to stay in his bed until the snail light goes off. (I have also heard of moms using a clock radio--when the music comes on, you can get out of bed...)
I just try my best to be consistent with this. Good luck.