Compression stockings are used after surgery to prevent blood clots developing in the leg, which is known as deep vein thrombosis (DVT).