Hydration starts 24-48hrs before your trip. If you are dehydrated when you get on the plane, you probably won't feel good during the flight. Assuming you are properly hydrated, this is a handy guide:
https://lifehacker.com/how-to-keep-p...ght-1818728808