‘To sleep, perchance to dream,’ is one of the many often quoted lines in Hamlet’s To be or not to be soliloquy in act 3, scene 1 of Shakespeare’s play, Hamlet.

The soliloquy is a logical expression of Hamlet’s thinking on the subject of death. He thinks about all the inconvenient, tedious and unpleasant things about life and fantasises about ending them with a long sharp needle in the heart or brain. (He does not specify which.) It would be so wonderful just to go to sleep  – by which he means to die –  and drift into unconsciousness, as we do when we place our heads on our pillow at the end of a day.

He is jolted by the thought that when we sleep we have dreams. Perhaps in that sleep of death, we would have dreams, and what would they be? He can’t answer that, and it frightens him.

This is part of the strong Christian theme that runs through the play. The question is what there is after death, which brings one to the issue of punishment. It is a vision of hell. This is the unknown, the fear of which makes us behave and, as Hamlet says, makes us pause, and eventually bear the bad things we know about in life rather than fly to other kinds of bad things we don’t know about that await us after death. So if we are thinking about suicide this thought gives us second thoughts about it and makes us less likely to do it

Death is often seen as nothing more than a sleep, but a sleep from which one does not wake up – not into the world of the living anyway. One sees it in poetry all the time, and on tombstones – she fell asleep, eternal sleep, sleep peacefully, etc. However, Hamlet goes beyond that, using the metaphor of a dream to contemplate the unknown horrors of hell.

More comforting than Shakespeare’s pointing to the horrific visions that may come after death is a recent scientific study about end-of-life visions, also referred to as dreams. In a recent study about end-of-life visions (End-of-Life Dreams and Visions: A Longitudinal Study of Hospice Patients’ Experiences. Journal of Palliative Medicine, 2014) the researchers interviewed hospice patients receiving end of life care. They talked about their dreams and their day-dreaming. Their dreams were different from those Hamlet refers to. They dreamt about departed loved ones and were looking forward to being reunited with them. The researchers concluded that the dreams were very different from Hamlet’s vision of hell. Their dreams tended to be comforting, realistic, and meaningful.

But whatever Hamlet may have been getting at the phrase ‘perchance to dream,’ has undergone the same journey as so many of Shakespeare’s images have. Not only has the phrase been quoted as an expression of the unknown aspects of the afterlife but, at the same time, it has been used as a title for many cultural works. Its beauty and memorability, as well as its hazy relationship with reality, make it perfect for use by science fiction writers.

Apart from the novels and poems with that title the most famous is probably episode nine of the American television series, The Twilight Zone. That episode, Perchance to Dream, is a story that plays around with dreams, reality and death, and is regarded as the most accomplished of all the episodes of that series.

To sleep, perchance to dream quote on black background