The yellow goop in your eyes when you wake up—often called “sleep” or eye discharge—is a mix of mucus, oils, dead skin cells, and dead bacteria.
It builds up because you don’t blink while sleeping. According to Andrew Huberman, it’s like the “casualties of a war” your eyes fought overnight to stay healthy. It’s normal, but if it’s excessive or comes with redness or itching, it might be an infection and should be checked out.