Leg edema may also be a sign of a more serious medical condition. For example, congestive heart failure can cause edema. Congestive heart failure happens when your heart is less effective at pumping blood, which allows blood to back up in your legs, ankles, feet and lungs. This causes edema.