Fluid retention can be caused by serious conditions involving the heart, liver, kidneys or blood vessels, but is often also caused by inactivity, such as when you are sitting up all night on an overnight flight.
Inactive muscles do not help pump fluid back up toward the heart.
It is a good idea on overnight flights to drink lots of water and get up out of your seat and walk around regularly. Alcohol contributes to the problem of water retention on flights, and should best be avoided.
It is also best not to wear tight-fitting shoes when you are on long flights.