This might be due to eye discharge comprising mucus, skin cells, oil, and other substances that collect at the corner of your eyes while sleeping. The eye discharge protects your eyes by removing waste products and other harmful substances from your eyes. During the day, the tear film produces lubrication that flushes out the discharge from your eyes. When you are sleeping and not blinking, the discharge may collect at the corner of your eyes and sometimes along the line of your eyelashes. However, some discharge may indicate an eye disease, especially if it is excessive, green or yellow-colored and accompanied by eye pain, sensitivity to light, and blurry vision. In such instances, you need to consult an eye doctor.