(This answer assumes the original question is asked regarding tournament settings).
You definitely should not drink any liquid before a chess game, because a bathroom break during a game can steal precious thinking time and break your train of thought.
As for food, it is wise to use the bathroom before every tournament game. When eating at a tournament, eat light meals between games and even lighter snacks during (if allowed) so more calories can be shared with the brain during a chess match.
My experience.
Should you eat before or after a chess game?