Throughout the poem the speaker, who is presumably Keats himself, is seekinig escape from the world. This may be because he is afraid of dying from tuberculosis, which eventually did end his life at an early age. Keats was becoming a fairly heavy drinker as a means of seekinig escape. He would like to get drunk but doesn't have anything available. He writes:
Oh, for a draught of vintage that has been
Cooled a long age in the deep delved earth
And he vividly imagines the glass of wine "with beaded bubbles winking at the brim."
He also thinks about drugs:
...as though of hemlock I had drunk,
Or emptied some dull opiate to the drains
One minute past and lethe-wards had sunk.
Then he decide to try to join the nightingale in his imagination without the aid of drugs or alcohol. But his restlessness makes him return to a craving for wine even when he is hiding in the shadows with the bird. He imagines a musk rose
...full of dewy wine
The murmurous haunt of flies on summer's eves.
This is like imagining a whole saloon full of men sitting around drinking wine, and it is a splendid example of Keats' remarkable imagination. He almost achieves the escape from his anxiety he is seeking when he writes two of the most beautiful lines in English poetry, saying that the nightingale's song has ofttimes:
Charmed magic casements opening on the foam
Of perilous seas in faery lands forlorn.