Question: why is z associated with sleep?
Answer: Zzz is an onomatopoeic representation of snoring. It was commonly used in media where sound effects were not an option, notably in comic books. That's where it got its association with sleeping, even though it wasn't the only device used to symbolize snoring. It's unclear why zzz came to represent snoring.