What causes water retention?

Capillaries
view of blood vessels
Water retention is possible when pressure inside capillaries (blood vessels) changes.

Fluid rich in nutrients, vitamins, and oxygen continuously passes from tiny blood vessels (capillaries) into surrounding tissues - this fluid is known as interstitial fluid.

Interstitial fluid nourishes cells and eventually makes its way back to the capillaries. Water retention may occur if the pressure inside the capillaries changes.

Water retention is also possible if something occurs that makes the capillary walls too leaky. If something goes wrong with pressure or the wall becomes too leaky, excess liquid will be released into the spaces between cells.

If too much fluid is released, more of it will remain in the tissues, rather than returning to the capillaries, resulting in swelling and water retention.

The lymphatic system

The lymphatic system drains fluid from tissues (called lymph) and empties it back into the bloodstream. However, if too much fluid is released in the first place, the lymphatic system can be overwhelmed - it is unable to return fluid fast enough, and it accumulates around the tissues.

Sometimes, if the lymphatic system is congested, the rate at which fluid is returned to the bloodstream may change. This means that fluid might remain in the tissues, causing swelling in various parts of the body, including the abdomen, ankles, legs, and feet.
The heart

Normal pressure within blood vessels is partly maintained by the pumping force of the heart. However, if the heart starts to fail, there will be a change in blood pressure, which often results in serious water retention.

Typically, the legs, feet, and ankles will swell. Fluid will also build up in the lungs, giving the patient a long-term cough and/or difficulty breathing.

Congestive heart failure can eventually cause breathing problems, as well as excessive stress on the heart. The patient will probably be prescribed diuretics. A diuretic is anything that promotes the formation of urine by the kidney - in other words, anything that helps the body shed water.

The kidneys

Blood is filtered in the kidneys - waste, fluids, and other substances are extracted and cross into tiny tubules; from there, the bloodstream reabsorbs anything the body can reuse. What the body cannot reuse - waste - is excreted in urine.

In most cases, kidneys can eliminate all waste materials that the body produces. However, if the blood flow to the kidneys is affected, problems can occur. For instance, in kidney failure, waste material, including fluids, cannot be eliminated from the body properly, resulting in fluid retention.
Pregnancy

The weight of the uterus on the major veins of the pelvis can cause a build-up of fluid in the body during pregnancy. In most cases, it is nothing to worry about and generally resolves after the baby is born.
Physical inactivity
man sitting on a sofa watching television
Physical inactivity can sometimes cause water retention.

Exercise helps the leg veins return blood to the heart. If the blood does not travel fast enough, it will begin to accumulate in the legs, resulting in higher pressure in the capillaries. Fluid will leave the capillaries at a higher rate because of the higher pressure.

The higher pressure also makes it harder for fluids to come back later on.

Exercise is necessary to stimulate the lymphatic system to carry out its function of regulating overflow - bringing fluids back into the bloodstream at rates that may regulate body water levels. Very long periods of physical inactivity, such as a long-haul flight, increase the risk of water retention.

During a long-haul flight, even minor physical movements, such as standing up on tiptoes a few times, rotating the ankles, and wiggling the toes can help reduce fluid retention.