Compression stockings are typically recommended to be worn throughout the day, from morning until evening, and taken off before going to bed. This can equate to about 16 hours a day, but it can vary depending on your individual health condition and your healthcare provider's advice.
The reason for wearing them during the day is because that's when you're most likely to be upright and gravity can cause blood to pool in the lower extremities, which the compression stockings can help prevent. They're usually not needed at night when you're lying down.
However, it's important to note that the usage of compression stockings can vary based on the medical condition they're being used for, and personal health factors. You should always follow the advice given by your healthcare provider regarding their use. The aforementioned advice is a general guideline and may not apply to everyone.