For surgical patients, anti embolism stockings should be worn as soon as possible after the procedure and continue to be worn during the hospital stay. In some cases, doctors may recommend wearing them for several weeks post-discharge. Pregnant women and those on bed rest should follow their healthcare provider's advice on the duration of use.