There isn't a current technical/medical name for this partly-solidified mucus that lubricates the eyelid's movement over the eyeball during sleep. In polite English circles, it is usually just called 'sleep', as in: "You've still got some sleep in your eye"...as you say 4getmenot. (Many families have their own childlike names for it, such as �sleep dust', �dream dust' etc. Others use 'gunge', 'gunk', 'crust' or whatever.)
It has some imaginative names in other countries. In Denmark, it is called �sleepy seeds' and in Scotland, �sleepy willies'. (Yes, I realise the latter could be misinterpreted!)
However, there are two now-obsolete English words for this substance listed in The Oxford English Dictionary (TOED). One is a 15th century word, �gound', based on the Old English word �gund' meaning pus. TOED defines it as " foul matter, especially that secreted in the eye". The other is a 17th century word, �gowl', probably based on the Old Norse word �gulr', meaning yellow. The OED defines it as "a gummy secretion in the eye".
Sadly, both 'gound' and 'gowl' have now vanished, but it is just possible that you might hear a very old person, speaking in their dialect, still making use of them.