Edema - a terminology used to denote swelling. It usually occurs because of - 
1.) Inflammation, and 
2.) Fluid retention, 
3.) Blockage of any major vein and lymph passage. 

Edema / swelling due to inflammation may occur after trauma, infection and may develop over any part of the body. Edema due to fluid retention (water retention) tends to accumulate in dependent areas - legs, lower back (when in lying down position), eyelids and face (on waking up in the morning).

A notice of edema warrants a search  for common causes which include a cardiac problem, a liver problem and a kidney problem. Hypothyroidism and less amount of proteins (albumin) in the blood also are important causes. Edema is a known side effect of a few common medications - pain killers, some anti diabetic agents, some BP medicines. It is not uncommon in women to develop edema on the legs a couple of days before and after a menstrual period, and during pregnancy.

So, what should we do if we notice that our legs / body have swollen up! Don't wait to get medical attention and evaluation.

Can we use any measures before we get medical help! Yes, definitely! Try to identify if the regular medication contains any pain killer meds and if present, quickly stop them. Limit the amount of water (and the total fluid) intake in a day to not more than a litre. There should be a wholehearted effort at reducing salt intake. Stopping papads, pickles, cheese and decreasing the amount of salt in the food should be among the first steps. If edema/swelling is predominantly on the legs then lying down with legs over a pillow or two might just help.

And yes there are certain medicines (known as diuretics) which might help decrease edema, best left to the doctor to decide which one might be most suitable to the patient.

Lessons to learn : Any notice of edema / swelling, don't sit on it, follow simple household measures, stop pain killers, get help of your doctor / nephrologist at the earliest.