Keats' poem "Sleep and Poetry" is an extended metaphor comparing sleep to poetry (and no, he didn't mean it puts you to sleep, although some of Keats' less well ordered poems might do that anyway ...). The poem starts out with an inspired description of the goodness and desirability of lovely sleep that whispers and softly closes eyes. He leads into this praise of sleep with a quotation from Chaucer in which chaucer complains that he can't sleep. Hence, Keats' lyrical musings on the pleasures of sleep--which eludes him all night as well since he is struck with poetic inspiration.
In language that is replete with classical allusions from Cordelia to Pan to Jove to Diana to the Great Alfred, Keats' sings the praise of "Posey" (poetry) as the one thing in all the world that can rival the qualities of sleep. Keats lies awake all night contemplating the comparison between sleep and posey and rushes to commit all his words and thoughts, sprung inspired during his sleepless night, to paper to immortalize the one thing that can possibly rival the luxurious transcendent quality of sleep, that being luxurious transcendent posey.