In cartoons and comics it's not uncommon to see a series of Z's to indicate that a person is in deep slumber, such as in the following political cartoon.
How and when did the letter Z come to be associated with sleeping?
"How and when did the letter Z become to be associated with sleeping?"
First of all, zzzz (or z-z-z-z) is sound of snoring, from at least 1918. (Sometimes "a tiny saw cutting through a log"  would be used, and both the snore and saw would make the same z-z-z-z sound.) Over time, this became associated with sleep in general, but most comic reference books (e.g. 2006's KA-BOOM! A Dictionary of Comic Book Words, Symbols & Onomatopoeia, 2008's Comic books: how the industry works) still mainly associate it with snoring.
See also Why Does ZZZ mean sleep? for another theory:
The earliest references I found connect zzzz with snoring, including an explanation that says snoring is indicated by zzzz.
Boys' Life in Jan 1919, and The Boy Scouts' year book also in 1919
Life magazine, Volume 79 in 1922:
Boys' Life in Oct 1927, recycling their jokes.
Contact point by the University of the Pacific, School of Dentistry in 1927:
Boys Life yet again in Nov 1928, this time with an illustration.
Illinois education, Volume 42 in 1953:
Instructor, Volume 67 in 1957:
My name is--: a game of letters and their sounds by Lois Baker Muehl in 1959:
Edit: Another Wikipedia apge:
I have just discovered this question and am surprised that more reference has not been made to the word snooze. There is a passing reference in the accepted answer but, on checking, this word dates back to 1789 and is described as 'a cant word, echoic of a snore.' Cartoons through the years seem to have extended snooze or borrowed the latter zzz sound which, by default, has become its representation. My theory, anyway!
According to Wikipedia :
Someone came close to the correct answer, but failed to put 2 and 2 together. The letter Z represents the motion of someone sawing wood with a hand saw, which sounds close to the sound of someone snoring. Originally someone "sawing wood" was the description given to the sound when snoring, often accompanied by an image of sawing wood or a hand motion (in the Z formation) of someone sawing wood. Later it was condensed and simplified just by using the letter Z or a series of Z's (ZZZZZZ = Sawing Wood = Snoring Sound)
Z looks like (also sounds like) electrical wave, and people send out brain waves when they are sleeping.
Thank you for your interest in this question.
Because it has attracted low-quality or spam answers that had to be removed, posting an answer now requires 10 reputation on this site.
Would you like to answer one of these unanswered questions instead?