The medical phrase for this condition is immersion diuresis. I used to do quite a bit of diving in my younger days and this phenomenon is considered to be a right pain in the neck (and other places) by most divers.
In simple terms, what happens is that the blood vessels in the extremities and skin become constricted following immersion. This leads to an increase in the volume of blood sent to the main organs of the body such as the liver, heart, and lungs.
The body contains a hormone called ADH, which regulates the quantity of urine the body produces. The body senses the increased blood volume and assumes that there is an excess of fluid in the circulation. This in turn, leads to ADH production stoppage. Without ADH, the kidneys are able to work at their maximum capacity to remove fluid from the circulation via the collecting tubule. The result of this is that urine volume is increased, the bladder is rapidly filled and you get the feeling that you need to empty your bladder urgently.
I should add though that if this condition is something you�ve recently developed, you should see a GP as it can be a sign of a urinary tract infection.
Don't share the bathwater!