When I first got Gigi as a puppy, I had her sleep on a dog bed that I put up on a desk chair and pulled it over to our bed. I made sure she couldn't jump out of it, but I wanted her to feel close to me at night. At first, she would cry and try to jump on the bed to be with me and my husband, but I'd tell her, "No, go to sleep" and move her back to her own bed. After a few nights of this she got the idea. But that didn't stop her from jumping up there and snuggling with my husband if I tried to sneak out to use the restroom in the middle of the night. Unfortunately for her, she is cream colored and very easy to spot on our brown sheets, even in the dark. So I'd pick her up and say, "Nice try, missy." Then I'd put her back in her bed and say go to sleep, which she did.
But once she was big enough to jump on our bed from the floor, all bets were off. The first night she did this, it was like she knew exactly what I wanted to keep me happy that she was up there. She curled right up at the foot of the bed right in the middle, so as not to in the way of my huband and myself. She is a good sleeper, too, and doesn't hog the bed at all. And one more bonus to having her sleep with us is our 3 cats hate being up there when she's there. So we went from having 3 cats on our bed at night to one dog. Pretty good deal if you ask me.