Phelps admitted to this on Jimmy Kimmel Show. I don't know why Lochte is getting heat for this. The link is still on the Drudge Report. Also, when do they have time to go to the bathroom with semis and finals within a 20 minute period. You know more people went to the bathroom in the pool during the cheating suit era.
If I have to go pee, I just hop out, pretend to be a sprinter (adjust goggles, stretch) and pee in the speedo. So long as I'm hydrated it's not obvious.
If you're serious about your practice, you won't want to get out in the middle of a set. If you're a sprinter, you might take those "bathroom breaks." ;)
What do you do if you have to go for a dump? Just sayin'...:D