Fluid loading was a protocol designed to ease shuttle astronauts' readjustment to Earth gravity.
One of the most important changes negatively impacting flight
operations and crew safety is landing day orthostatic intolerance.
Astronauts who have orthostatic intolerance (literally, the inability
to remain standing upright) cannot maintain adequate arterial blood
pressure and have decreased brain blood levels when upright, and they
experience light-headedness and perhaps even fainting. This may impair
their ability to stand up and egress the vehicle after landing, and
even to pilot the vehicle while seated upright as apparent gravity
increases from weightlessness to 1.6 g during atmospheric re-entry.
....
Starting about 2 hours before landing, astronauts ingest about 1 liter
(0.58 oz) of water along with salt tablets. Subsequent refinements to
enhance palatability and tolerance include the addition of sweeteners
and substitution of bouillon solutions.
The reasons for this condition are not well understood but are linked to the body's physiological responses to free fall.
While orthostatic intolerance is perhaps the most comprehensively
studied cardiovascular effect of spaceflight, the mechanisms are not
well understood.
Source
The Flight Rules contain more rationale about the protocol
Oral fluid loading with a salt/water mixture similar to body fluids
has been shown to significantly reduce detrimental heart rate and
blood pressure changes during orthostatic stress post flight. Basing
the amount of salt and water (in a proper ratio) or other approved
solution on the crewmember’s body mass helps to assure the fluid
loading is adequate for larger crewmembers and possibly not too much
for smaller crewmembers. ASTROADE ® and other tested isotonic
solutions provide plasma volume expansion similar to salt
tablets/water and may be easier for some crewmembers to ingest.
Flight Surgeons must approve these alternate solutions for individual
use prior to flight.
The basis for
initiating fluid loading 1 hour prior to TIG includes the amount of
time it takes for fluid to leave the stomach, enter the intestine, and
be absorbed to affect the plasma volume. A plot for gastric emptying
(i.e., the time to leave the stomach and enter the intestine) showed
that it takes approximately 60 minutes for nearly all of an isotonic
solution consumed to enter the intestine (approximately 20 minutes for
80 percent, approximately 40 minutes for 95 percent, approximately 60
minutes for 98 percent, and approximately 80 minutes for 100 percent).
Furthermore, it takes approximately 2 hours from initiation of fluid
loading for the change in plasma volume to plateau (at approximately 5
percent). Since landing occurs 1 hour after TIG, change in plasma
volume will peak at landing if fluid loading is initiated 1 hour prior
to TIG.
From a wave-off perspective, the desire is to delay fluid
loading as close to TIG as possible since weather wave-offs often
occur just minutes prior to TIG. However, consuming too much too fast
can cause gastric discomfort and vomiting.
If fluid loading is
initiated 1 hour prior to TIG but deorbit is subsequently delayed, the
impact is crew discomfort and increased WCS usage . Although this is
undesirable, it is not a safety issue. However, if fluid loading is
delayed and the reduction in the change in plasma volume at landing is
significant, then crewmembers may feel faint or dizzy upon return to
1g and may not be able to egress unassisted. This can be a safety
concern for crewmembers involved with landing the vehicle and for all
crewmembers in an emergency egress scenario.
and the table of how much to drink

Source
This page from the Deorbit Preparation Checklist shows the protocol in the timeline.

Source
Acronymology:
EI - Entry Interface, 400k feet, the point at which atmospheric effects become noticeable
PMC - Private Medical Conference, a discussion between a crewmember and a Mission Control flight surgeon on an encrypted comm loop
TIG - Time of Ignition (for the deorbit burn)
WCS - Waste Collection System, the shuttle toilet
Note: Presumably ISS astronauts have similar protocols when they return to Earth but NASA has chosen not to publish ISS Flight Rules.