Is this only when you're gone from the house? If so, it's anxiety. My Maggie Mae (ATB) had that for the last year of her life. It was VERY hard to deal with, frustrating yet she couldn't help it. It was from age & anxiety. A horrible combination. She would pee and poop even if we left the house for 10 minutes. SO, for the last year of her life we limited our time from the house with no one home. One of us tried to stay behind with her. It really made our lives simplier. I know that isn't an option for everyone, almost no one.
We tried dozens of solutions until we found something that helped. We got her denim pants from PetSmart and the only pad that was absorbent enough to hold a full bladder of urine is POISE. It is in the pink package and reads
"Poise Pads, ULTRA"
They are the heaviest absorbency. Because the pads are fairly thick we needed size LARGE denim pants. This held full bladder urine for hours. As far as the poop, that's a different story. It would drop out and we'd just clean it up. Now, I think they have disposable diapers at PetSmart and other pet places. I don't know how much urine they hold or if they hold poop. I know at the time we went through this I could only find disposable diapers online and they were expensive. I hope this helps. We knew the reason why after a through medical workup and then she would start to pant heavily when she knew we were leaving. TV or radio wasn't an option as she was deaf at this point. SO we did what we could for her to make her life comfortable.
** We never limited her water. I don't think you should do that.