Sleep crust (also known as eye gunk or eye goop) is a mixture of mucus, exfoliated skin cells, oils, and tears. It has nothing to do with spiders.
According to numerous Facebook posts, male spiders mistake human eyelashes for female spiders at night. According to the posts, this results in eyelashes becoming stuck together and grittiness in the corner of the eyes. There is no proof that these claims are true.
The American Academy of Ophthalmology has stated that it's common to wake up with crustiness in the corners of one's eyes and on the eyelashes. The crust can appear yellow, hard, clear, sticky, or thin. On the other hand, the American Academy of Ophthalmology also reports "eye goop [that] is not the typical sleep crust [...] could signal that you have an eye infection or other condition."
According to the University of Utah's health blog, sleep crust is a mixture of mucus, exfoliated skin cells, oils, and tears that the eye produces or sheds when sleeping and is an unavoidable aspect of normal eye function.