This is a troubling situation for pet owners and takes some investigation to determine the cause.
There are some medications that will cause a dog to leak urine ~ especially during sleep. When the course of the medication is over, the condition often goes away.
Sometimes, urinary incontinence is simply due to the aging process. Older female dogs weighing more than 40 pounds are the most common group to experience this condition.
There are treatments available now which have proven to be quite effective and many pet owners find that they do not have to give the medication continually. For some, the condition does not come back. And for others, several months can go by without needing to give the dog any medication.
It is also important to rule out possible illnesses such as diabetes, or urinary tract infections. This is generally done with urine and blood testing.