On the subject of nighttime bowel accidents, it does happen to me, but fortunately very infrequently.
It seems that several of us are satisfied with the SoSecure swim diaper. Although there are several brands of swim diapers available, perhaps the best rated (and the one I personally wear) is the SoSecure swim containment diaper (fecal containment diaper), intended to be worn under swimwear.
The SoSecure attaches snugly via very strong Velcro in the wings. Although it is neither advertised nor intended to contain urine, it will contain a small amount effectively. I usually get some pool water inside the SoSecure swim diaper. When I do, as I am coming out of the pool I actually have to break the seal at the leg holes to let the excess water out. A problem could be that, with some pool water getting inside the diaper, along with some urine, a more substantial amount of liquid eventually will have to be released somewhere - a shower in the changing room would be my recommendation. Please note that, to work effectively, the SoSecure swim diaper must be worn fairly tight - somewhat more than snug.
--John