Some rims have a little hole to let it out (centrifugal force [1] will spin the water to the edge and out of the hole when riding).
Otherwise you have to remove the tyre and tube and leave the bike with the valve hole at the bottom. An alternative method might be riding down a very long hill using the brakes to keep your speed to 5mph - I've had steam coming out of rims before.
[1] yes, physicists, I *know* there's no such thing