Flying doctor diagnosed dehydration. Don't drink coffee etc on longhaul flights and stick to water or the nearest thing to it.
Your doc may have given you the best information he had at the time but it widely known that drinking anything will hydrate you just fine.