I always pee before departure. It's part of the ritual. The "safety pee" I call it. I get back from the restroom (or from behind a tree, depending on the sophistication of the available facilities) and then do one more circumnavigation of the airplane before boarding. That last walk is where I spot unsecured baggage doors, FOD, items placed on the airplane, or the remainder of interrupted tasks. This isn't what I mean by my preflight walkaround: that is more thorough. It's just a last look before I board.
Yesterday I completed the safety pee, walked around the airplane, got in the cockpit, flew for 5.7 hours, drank water when I was thirsty, landed, unloaded, fuelled, taxied from the fuel pumps to parking, and then went to pee, because I felt like I needed to a little. Today I took off after the same preflight ritual and only an hour and fifteen minutes later had to pee so badly I was doing the pee-pee dance right there in the cockpit. I wasn't going to make it to the destination, only forty minutes away. When it comes to technology that makes my life better, folks, the pee bag rivals the wheel. I have landed airplanes without wheels, but landing is so much harder with my legs crossed. So I succumb to the biological need and fill a pee bag to the 600 mL mark. Yeah, my pee bags are calibrated. I have no earthly idea why. Maybe some people like to keep track. Or brag. Am I bragging? Six hundred millilitres isn't bragworthy. I can pee much more than that. I can hold much more than that. Why did my body desperately have to void that 600 mL then and there, when on another day it would happily tanker 900 mL to destination?
So I peed in the bag, flew to destination, landed, threw out the full pee bag, drank more water, and then flew another 5.8 hours without even thinking about my bladder. Body, what are you doing in there? Millions of years of evolution and for most of them our ancestors could pee wherever they were. I did a bunch of reading once on the various nerves and systems that allow us to pee and signal to us that we need to, but it didn't answer the question of why frequency and timing of urgency is so poorly correlated to water intake and recency of voiding.