Before and after
Your legs will begin to swell as soon as you the plane reaches cruising altitude and even before that as the cabin is pressurized.
Putting your stockings on after that is futile. Therefore i always tell my patients to put them on before leaving your home for the airport and don't take them off until you are settled into your final destination. Drink plenty of water and walk while in the air.