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 becomes less effective at pumping blood. This allows blood to back up in your legs, ankles, feet and lungs. This causes edema.