Every puppy needs to learn the skill of resting calmly in a crate. This skill will be needed at the veterinary hospital, for traveling, and for restricted activity due to illness. It's also a lifesaver for many young dogs during the destructive chewing stage that starts at several months of age and can last until age 2 to 3 years in some breeds.
After a dog has become trained and reliable in the house, the crate will often be needed only for specific reasons rather than everyday use. One critical situation that can call for bringing out the crate again is separation anxiety. The ability to relax in a crate can save a dog's life during this crisis. Usually it works best to crate the puppy in your bedroom when you're sleeping.
If you want the dog to share your bed, wait until the adult temperament emerges. Then if it turns out the temperament is not suited to bed privileges, you will not have the difficult job of teaching the dog to stay off the bed. Teaching a puppy to stay off the bed from the beginning is much easier, both for you and for the pup. People tend to make the mistake of giving the puppy attention for making noise in the crate.
When you do this, you confirm the puppy's instinct that being alone is death (it would be, in the wild), and that calling for help will bring someone. Having the crate in your bedroom for sleeping tends to help because the puppy can hear, smell and possibly see you. Not being alone, the puppy usually finds it easier to get used to the crate. Your sleeping helps set the scene for the puppy to sleep, too.
Keep the puppy on a good schedule of food, water and outings so the puppy's body will have the best chance of making it through the night without a bathroom break. If the pup does need a break, make it very low-key with dim lights and soft voices and no playtime. If you completely avoid going to the puppy when the puppy is making noise, problems usually pass quickly. But make no mistake, lost sleep comes with the puppy-adoption territory! Don't miss the chance to start your puppy off right, or you will lose a lot more sleep over a longer period of time, because crate-training will take much longer.
The worst thing to do is let the puppy yell for a long time, and then go to the puppy. Doing that teaches the puppy to persistently make noise in the crate. It communicates to the pup that you want to be notified with lots and lots of noise! It also causes the puppy enormous stress that can become a lifelong response to being confined in a crate. Adult dogs in this stressed state can break out of crates and badly injure themselves. This is not the future you want for your puppy.
What you want the puppy to discover is that nothing bad happens from being alone in a crate. You also want the puppy to learn that it's okay to let you know of a need, but you will not come in response to loud racket. Check on the puppy after the puppy has become quiet again.
If your puppy isn't making it through the night without a potty break, schedule it so that the puppy doesn't have to wake you up and ask. Realize, too, that the puppy's body will awaken and need to potty whenever someone in the household gets up. That person or someone else will need to give the pup a potty break. Don't trick a puppy about the crate. Give a treat when the pup goes in, but don't be sneaky about shutting the door. Don't put the puppy into the crate when the puppy is sound asleep, to wake up trapped in a crate. That can cause the puppy to distrust both you and the crate.
Be careful not to abuse the crate. When you are at home and awake, supervise the puppy in person rather than using the crate. Puppies need exercise, mental stimulation and guidance from you in order to grow up healthy and happy. Too much crate time is not humane. Puppies sleep 14 hours a day or so. If the crate time is scheduled so the pup can use it for sleeping, that's ideal. Make the crate a pleasant place to rest. A few safe chew toys and a treat can help the puppy relax and drift off to dreamland. Everyone in the household can sleep better with a crate-trained puppy.