This then was the Sandman; but what was his occupation, and what was his purpose ? The nursery-maid being applied to, gave a nursery-maid's explanation, that the Sandman was a bad man, who flung sand in the eyes of little children who did not go to bed.
Source: wiktionary
1811, Arabian Nights' Entertainments, Consisting of One Thousand and One Stories, Told by the Sultaness of the Indies, Henry Mozley (publ.), page 114.
While I was out, a sandman, who sells scouring sand, which women use to clean the baths with, passed through our street, and called, Any sand ho !
Source: wiktionary