
Same thing happened to my dog. She was asleep and completely emptied over the floor and looked confused when she woke. Happened a couple of times and she also dripped. My dog was diagnosed as having incontinence due to having been spayed. The incontinence started about 10 mnths after her operation.
I have to give her hormone drops in her food twice a day and this has stopped the incontinence.
As others have said though, you should get her checked out for a urine infection