I tend to get foot swelling during long terms. If I'm in a car, I try o take a break every few hours and walk around a little to get blood circulation going. It's a bit difficult during a flight, but I do take extra trips to the bathroom just for an excuse to walk a little bit.
My dad is a doctor and he actually suggested that I take a baby aspirin during trips. Since aspirin thins blood, it makes blood circulation easier. I have been doing this as well.
Of course, it's best to ask a doctor. I'm sure there are people who cannot take an aspirin. But stretching the legs and walking around a little bit is a sure way to prevent and reduce swelling caused by poor circulation.