The only way to prevent edema is to prevent the cause. Smoking is the main cause of chronic lung disease. Congestive heart failure most often is caused by coronary artery disease, high blood pressure or drinking too much alcohol. To avoid leg swelling on long trips, stand up and walk around often. Ideally, you should get up once an hour. If that's not possible, then exercise your feet and lower legs while sitting. This will help the veins move blood back toward the heart.
Treatment of edema focuses on correcting the cause of the fluid accumulation. A low-salt diet usually helps. You also should avoid drinking too much fluid. If you are not short of breath, elevate your legs above the level of your heart to keep swelling down. Your doctor might suggest that you take a low dose of a diuretic (water pill).
For swollen ankles and feet caused by pregnancy, elevate your legs and avoid lying on your back to help improve blood flow and decrease swelling.
If you have mild leg edema caused by venous insufficiency, elevate your legs periodically and wear support (compression) stockings. Sometimes surgery is needed to improve the flow of blood through the leg veins.
No matter what the cause of edema, any swollen area of the body should be protected from pressure, injury and extreme temperatures. The skin over swollen legs becomes more fragile over time. Cuts, scrapes and burns in areas that have edema take much longer to heal and are more likely to get infected.