Another possible cause is heart failure. When the heart cannot pump blood effectively, fluid may accumulate in the feet, ankles, and lower legs. This swelling often affects both legs and may occur alongside shortness of breath, fatigue, rapid weight gain, or difficulty lying flat while sleeping. These symptoms require prompt medical evaluation because untreated heart failure can become life-threatening.
Kidney disease may also contribute to swollen legs. Healthy kidneys regulate the body's fluid balance, but when kidney function declines, excess fluid and sodium may build up in the tissues. People with kidney disease sometimes notice swelling in the legs, around the eyes, or in the hands, particularly if kidney damage becomes more advanced.