The Sandman is a mythical character in central and northern European folklore who brings good dreams by sprinkling magical sand onto the eyes of people while they sleep at night.
Traditionally, he is a character in many children's stories. 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.
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. In Romanian folklore there is a similar character, Mos Ene (Ene the Elder).
Here's a famous stop-motion short animation movie about the sandman directed by Paul Berry. Enjoy:
An opening tracking view of a mountainous lunar landscape and the title card (“The Sandman”), both accompanied by menacing musical cues, dissolve into an unearthly crescent moon and an establishing exterior view of a nighttime household which could be (based upon details like a round tower, half-timbering and mullion windows) in medieval Europe. Inside, a woman sews by the fireplace and a small pale boy, perhaps her son, beats noisily on a toy drum. A cuckoo clock strikes eight o’clock (the “cuckoo” is a skeletal death figure) and the woman sets down her sewing, takes the boy’s drum away, gives him a small oil lamp and, with a pat on the head, dispatches him off to climb a dark and ludicrously lengthy series of staircases to bed. The child’s tremulous ascent is attended by every sort of scary, creaking noise and mysterious, elusive moving shadow.
Once on the upper floor, he dashes for his bedroom, jumps into his bed (which is bathed in hideously lurid moonlight from the large bedroom window) and pulls the bed sheets up over his head. However, he cannot help peering out at his darkened room and through the window at the weird crescent moon, which momentarily takes the form of a terrifying beaked and feathered face in profile. He rubs his eyes and it is gone. A rustling under his bed turns out to be a scolding rat.
Meanwhile, at the foot of the stairs, a strange apparition appears through a closed door: A menacing, raptor-like human figure with huge, hooked nose and chin (echoing the shape of the crescent moon), feathered arms, and knee breeches with stockings—the Sandman. He seems to specialize in creating unnerving and unaccountable sounds in the night and proceeds up the stairs with a curious mincing gait. The boy, who can hear him approach, alternately hides under the covers and cranes his head about to see the impending danger, until he accidentally breaks his lamp and the noise alerts the Sandman to his location. An intruder into the boy's room pulls back the quaking covers, but it turns out to be his solicitous mother, who retrieves the broken lamp, closes his eyes reassuringly and quietly withdraws. No sooner does the door close, however, than the Sandman emerges from the shadows. He commences an exaggerated, almost ritualistic, step, then a leaping dance, around the bed, all the while making small noises to prompt the boy (who resolutely refuses) to open his eyes. He is preparing a handful of sand to toss into the boy's eyes. Finally, the boy relents, opens his eyes, and the Sandman peppers his face with sand. But in silhouette, we can see that the Sandman has also taken something and, his objective apparently attained, he abruptly flies out the open window and into the night sky. On the moon, the Sandman lands on what we now realize is his nest (seen in the opening shot) which contains three of his tiny, hideous progeny. He opens a small, black pouch, and produces (we see this almost simultaneously with shots of the boy's empty-socketed face) -- two eyeballs. The chicks feast greedily. (After the end titles, the little blind boy is seen walking helplessly and then is seen amid a large number of similarly victimized children.)
Many songs have also been made about the sandman. Surely the most famous are Enter Sandman by Metallica (which lyrics I've quoted in the title of this post :P) and Mr. Sandman by The Chordettes.