Thank you so much for the feedback!
It may well be that the discharge appears darker when your child wakes up and the tears have evaporated, leaving behind the deposits.
In both children and adults, this is most often due to a sinus infection, such as a cold that has gone into the eye (viral origin). This will disappear on its own, usually 5 to 7 days, as in the case of a cold. There is no need to apply antibiotics for a viral infection
What I can suggest is to continue to keep the area clean with a clean damp cloth as often as needed, being careful not to share the cloth and not to reuse it, nor in the other eye, as it can be contagious (like a cold).
Lubricating drops such as Systane Ultra, Refresh Tears, Hydrasense can be instilled as needed to improve comfort
If there is no improvement after 5 to 7 days, or if the discharge becomes more purulent, a doctor or optometrist should be consulted for a thorough evaluation of the area.