Our blood vessels leak. Due to gravity fluid accumulates at the lower parts of our bodies. Veins have no heart to pump the blood back. They rely on contraction of our muscles squeezing against the vein. This pushes blood to above the next valve in the vein. If you sit, the muscles do not do that job. If valves have been damaged by blood clot, obesity or pregnancy, then fluid will not reliably return to the heart.
Leg swelling caused by the retention of fluid in leg tissues is known as peripheral edema. It can be caused by a problem with the circulatory system, the lymphatic system or the kidneys.
Leg swelling isn’t always a sign of a heart or circulation problem. You may often experience swelling due to fluid buildup from being overweight, being inactive, after sitting or standing for a long time, or wearing tight stockings.