Modern Fighter pilots carry a “piddle stick” which is a bag to pee into.
Specially the Male fighter pilots use something called a "piddle pack", which is a bag filled with absorbent gel. So the flow is something like this when the need strikes, they unzip and pee, pretty simple.
The big question now is, what about the female fighter jet pilots?
We all known that peeing into a tube doesn't work for females for some obvious physical reasons, so today's fighter pilots urinate into “piddle packs," plastic packs that convert urine into a gel for disposal.
This flow to do it is hard because it involves partially undressing while driving a super sonic jet, the pilot is also strapped in a tiny cockpit and flying a multimillion-dollar aircraft.
In Vietnam war the gear was almost non existent some pilots created there own bathrooms to pee.
This makes us think about how the F4 Phantom pilots who used to have to fly to Thailand from Florida for deployment to Vietnam, midair refuelling, and 1st stop Hawaii 9.5 hours, I didn't even figure into that! And I bet those cockpits got pretty smelly.