Having a dog is often compared to having a child. Often dog owners get a new puppy and have the puppy sleep in their bed or in their bedroom at night so the puppy feels secure and loved. There is nothing wrong with having your dog sleep in your room at night, but training your dog to then sleep alone in another room can be challenging.
Put your dog in its crate when you are ready to go to bed.
Place your dog's favourite blanket or toy in the crate.
Reward your dog with a treat when it goes into the crate.
Let your dog out of the crate after a few hours.
Repeat steps 1-4 the next night, but leave your dog in the crate for a longer period of time than the night before.
When your dog is able to sleep in the crate for the whole night, move the crate to another room.
Reward your dog with a treat when he goes into the crate in his new room.
Give the dog some time to adjust to sleeping in a crate. Dogs are naturally den animals and enjoy sleeping in a crate because they consider it their home, but you have to give a dog some time to adjust. If your dog absolutely does not take to sleeping in a crate, try using a dog bed instead and simply reward the dog with a treat when he or she goes and sits in the dog bed at night.
Make sure to get a dog crate big enough for your dog to stand up in and turn around in. Do not get a crate that your dog can walk around in because your dog may think it is acceptable to go to the bathroom in one end of the crate and go to sleep in the other end.