The Sandman is a mythical character in Western and Northern European folklore who puts people to sleep and brings good dreams by sprinkling magical sand onto the eyes of people while they sleep at night.
Traditionally, the Sandman is a character in many children's stories and books. In Scandinavian folklore 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" (rheum) in one's eyes upon waking is supposed to be the result of the Sandman's work the previous night.
E. T. A. Hoffmann (1776–1822) wrote an inverse depiction in 1816 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. In Romanian folklore there is a similar character, Mos Ene (Ene the Elder).
Hans Christian Andersen's 1841 folk tale Ole Lukøje introduced the Sandman, named Ole Lukøje, by relating dreams he gave to a young boy in a week through his magical technique of sprinkling dust in the eyes of the children. "Ole" is a Danish name and "Lukøje" means "close eye". Andersen wrote:
There is nobody in the world who knows so many stories as Ole-Luk-Oie, or who can relate them so nicely. In the evening, while the children are seated at the table or in their little chairs, he comes up the stairs very softly, for he walks in his socks, then he opens the doors without the slightest noise, and throws a small quantity of very fine dust in their eyes, just enough to prevent them from keeping them open, and so they do not see him. Then he creeps behind them, and blows softly upon their necks, till their heads begin to droop. But Ole-Luk-Oie does not wish to hurt them, for he is very fond of children, and only wants them to be quiet that he may relate to them pretty stories, and they never are quiet until they are in bed and asleep. As soon as they are asleep, Ole-Luk-Oie seats himself upon the bed. He is nicely dressed; his coat is made of silken fabric; it is impossible to say of what color, for it changes from green to red, and from red to blue as he turns from side to side. Under each arm he carries an umbrella; one of them, with pictures on the inside, he spreads over the good children, and then they dream the most beautiful stories the whole night. But the other umbrella has no pictures, and this he holds over the naughty children so that they sleep heavily, and wake in the morning without having dreams at all.