Puppies cannot hold their bladders for very long when they are young. As a general rule of thumb, dogs can hold their bladder for about one hour for every month of age, plus one, and for a maximum of 10-12 hours when they are fully matured.
If you are crate training your puppy or if your puppy is otherwise dependant on you to relieve himself, you should take him out to pee every couple of hours. If he’s sleeping, though, let him continue sleeping. He’s most likely going to wake up by himself and whine to being let out. Wait until he becomes silent, even for a few seconds, and take him out to pee without making a big deal out of it.
Here are some tips to make it easier for you during the night:
Give your puppy the chance to relieve himself right before you go to bed. This will help him stay asleep for longer during the night and not wake you up as much.
If your dog is asleep before you go to bed, you can wake him up and take him out to pee. He’s probably going to quickly go and return to sleep.
To prevent your puppy from waking up and not going back to sleep, treat the potty break like a business transaction. Don’t make a big deal out of it: no excitement, no play, and no bright lights.
Just take your dog straight out to pee and come back.
If your puppy is currently pad-trained, maybe due to a lack of vaccinations, you can set up a convenient long-term space for him with a bathroom. This will save you some of the trouble of waking up during the night and, as a bonus, will help you potty train your puppy a bit faster.
Here’s a great video to help you set up a puppy play den:
Beware, however, that this kind of space needs getting used to. Your puppy probably won’t like staying inside much at first. You will need to and be careful not to leave him inside for too long, especially when he’s not used to it yet.