To treat the problem, you need to keep your eyelids clean. Warm compresses help reduce redness and swelling and keep the eyelids clean. You may also need to clean your eyelids when you wake up.

Wash your hands with soap and warm water.
Wet a clean washcloth with warm water. Then wring it out.
Close your eyes and place the washcloth over your eyelids for 3–5 minutes. This helps loosen scales or crusts.
Wet the washcloth again as often as needed to keep it warm.
Repeat 2 or more times a day. Use a clean washcloth each time.

Wash your hands with soap and warm water.
Use a ready-made eyelid scrub. Or, mix 3 drops of baby shampoo in 1/4 cup of warm water.
Dip a lint-free pad, cotton swab, or clean washcloth in the scrub.
Close one eye and scrub the base of the eyelid.
Rinse the lid in cool water and dry with a clean towel.
Repeat on the other eye.