Question: what to do when your legs get swollen?
Answer: Put your legs on pillows to raise them above your heart while lying down.
Exercise your legs. ... 
Follow a low-salt diet, which may reduce fluid buildup and swelling.
Wear support stockings (sold at most drugstores and medical supply stores).
When traveling, take breaks often to stand up and move around.