Traditionally he is a character in many children's stories, invoked to lull children to sleep. He is said to sprinkle sand or dust on or into the eyes of the child at night to bring on dreams and sleep. The grit or "sleep" in one's eyes upon waking is supposed to be the result of the Sandman's work the previous evening.
Ole Lukøje, one of Hans Christian Andersen's more obscure folk tales, told of the different dreams the Sandman gave to a young boy in a week.
E.T.A. Hoffmann (1776–1822) wrote an inverse depiction of the lovable character in a story called Der Sandmann, which showed how sinister such a character could be made. According to the protagonist's nurse, he threw sand in the eyes of children who wouldn't sleep, with the result of those eyes falling out and being collected by the Sandman, who then takes the eyes to his iron nest on the moon, and uses them to feed his children. The protagonist of the story grows to associate this nightmarish creature with the genuinely sinister figure of his father's associate Coppelius.
The Sandman is a popular character in folklore referenced in popular culture over several centuries. Some noteworthy examples include: