Know the feeling. It's a function of age they tell me. Here's what I do.
1. My before-flight checklist includes a 'PILOT - Drain excess fluid' item immediately after the Check A is complete (whether I want to go or not).
2. No tea or coffee before flight or at lunch stop. Take a bottle of water and sip in flight if thirsty.
3 I have a couple of 'Little John's on board and to hand, though thanks to 1 and 2 above they've never been used.
I seem to be seriously affected by tea. When I only drink water, things are so much better. I recently managed a 14.5 hour flight with two refuelling (and loo) stops without drama consuming only water and Pringles (not to mention 800 litres of avgas).