To have crusts in the eyes on waking, .... yuck!
It is important that our eyes stay constantly wet to be protected. So the tear glands make tears all the time. When you sleep, your glands continue to produce tears. However, tears are made up mostly of water and fats. When we sleep, the eyelids are closed. Then the fat accumulates at the corners of the eyes and dries to give small crusts. in addition to this, small dead bacteria and other small debris.