We were concerned about the 4am baths so I understand! OK, Loki had done this 4 or 5 times over the course of a month or two long after he was fully housetrained and crate trained. At first we were puzzled and thought he was peeing and then lying in it, but then we figured out the blanket wasn't even wet (he was curled in a ball and his fur got it, it wasn't much). Then we thought maybe he was licking himself or something, but finally he was napping one day and my husband and I were watching tv. Loki didn't move a muscle and we noticed all of the sudden he was wet. So we knew he was peeing in his sleep. So off to the vet...
The vet ran a test for a UTI, which we had to rule out although no he'd had no accidents when he was awake. It wasn't a UTI so she prescribed a drug called PPA. She said it's a very safe drug for dogs and they can be on it their whole lives if they need to be. She said some can be weaned off though. I give him a quarter of a pill with his dinner every day (It is meat flavored, so I just throw it on his kibble. He eats it first.) Anyway this has taken care of it. If it didn't I was supposed to give him a pill twice a day. We are still careful with water around bedtime. If he wants water late at night we just make sure he is "empty" and make him go out a few times before bed.
Now, the vet also said incontinence is VERY VERY rare in male dogs. But Loki is unique in many ways.

Anyway, she said it is quite common in females. So, if that's what you're dealing with, I have to say the treatment and outcome for us has fine. It's cheap too, in case you were wondering.