There are a few different causes of swelling in the feet and ankles. People often notice that their feet are swollen at the end of the day (or with extended periods of immobility) due to an underlying condition known as venous insufficiency. Over time, the veins in the legs begin to lose some of their elasticity and/or the valves in the veins that normally prevent backflow of blood become damaged. As a result, the veins' ability to return blood to the heart and upper part of the body is diminished. Normal movements of the legs (such as walking) churn the muscles and help return blood through these veins. Without such movement, the blood tends to pool in the leg vessels, building up the pressure in the vessels and causing some fluid to leak out of the capillaries and into the skin, causing swelling. Wearing tight compression stockings under your pants or keeping your legs elevated under the desk can help alleviate your symptoms.
More rarely, other underlying conditions can cause swelling in the legs, such as blood clots, heart failure or loss of large amounts of protein in the urine. You should talk to your doctor
about your symptoms and discuss the different options for management.
Swelling that occurs in only one of the legs is more likely to be related to an underlying problem such as a blood clot that forms in the veins of the leg.