Rule out physical reasons, such as a urine infection or a baldder muscle problem. If it's a male dog, do they have a prostate? Could it be a prostate infection?
If there is no physical cause, think of other things...did you change his food? Did you just have a new baby? Did you recently move? Did you recently put down a new rug or flooring?(they urinate to "mark" their territory sometimes in the face of a new scent in the house)Are you giving him a different doggie treat? Did you chnage his brand of flea control? Did he start on a new meidcation for some other eason?(my dog had an ear infection and was taking an antibiotic called Clavamox and he was peeing every 5 minutes...he couldn't help it!). Generally, when a usually good dog starts to do something out of character, something in their environment has changed and they are reacting to that change.