I had a 12 yr old who never had to go out during the night. If this started suddenly maybe the dog picked up a prostate infection or just a UTI, in any case, it's worth taking a sample in to the vet's and having it checked out. Your vet might have ideas on how to solve the problem.