Have you ever woken up to something gooey in the corners of your eyes? Why do we get eye crust when we're asleep but not when we're awake?
It's simple, we don't blink while we're asleep.
Our eyelids act like windshield wipers. During the day all sorts of stuff like dust, tears, sweat and oils gets in our eyes, and our eyelids wash them away when we blink.
Since our eyes are closed when we're asleep, all that stuff builds up and dries out near that fleshy bump in the corner of the eye called the caruncle.
Plus, when your eyelid is shut your eye is warmer, which allows bacteria to grow. Since when your eyelid is closed you don't make tears that protect against bacteria buildup your body sends bacteria-eating cells to your eye. Eye goop also includes the chemical remnants of all that bacteria fighting action.