Usually, having the puppy sleep in a crate near your bed is the best idea. Try to comfort the dog as much as possible before you put it to bed. Put a thick blanket in the crate and make it as comfortable as possible.