Tuesday 18 March 2014 12.56 EDT
First published on Tuesday 18 March 2014 12.56 EDT

Sleep is the final frontier. Everyone does it, no one really understands it, and writers love to speculate about just what happens when we drift off … And what might occur if, for some reason, we suddenly couldn't.

Literature abounds with examples of sleep as a way of cheating death or extending life, from Endymion of Greek myth and Keats's poem, granted eternal sleep and deathlessness by his lover the moon goddess, to Washington Irving's Rip van Winkle, who sleeps in the Catskill Mountains for 20 years, to science fiction's suspended animation, which allows space travellers to sleep for the hundreds of years it would take to traverse vast interstellar distances.

Take, for example, AE Van Vogt's Far Centaurus, in which a spaceship crew are frozen to keep them alive across the trackless wastes of space only to find (spoilers ahead if you haven't read this 70-year-old short story) that they've been out for the count so long that humanity has developed faster-than-light technology and there's an established Earth colony waiting for them when they finally sputter up to their destination.

Once we venture beyond the wall of sleep, as HP Lovecraft would have it, technology and cosmic punchlines give way to fantasy and horror. Opening the 1919 tale "Beyond The Wall of Sleep" with an epigram from Shakespeare's great snoozer Bottom in A Midsummer Night's Dream ("I have an exposition of sleep come upon me"), Lovecraft writes: "I have frequently wondered if the majority of mankind ever pause to reflect upon the occasionally titanic significance of dreams, and of the obscure world to which they belong."

Neil Gaiman, of course, built a career on the exploration of the dream world with his comic magnum opus Sandman, recently resurgent, in which the pale Lord Morpheus ruled over the ever-shifting realm the Dreaming. Mortal dreamers appear briefly there during their sleeping hours in classic nightmare scenarios, running trouserless along endless corridors or serving up dishes at dinner parties thrown by Morpheus (they put their appearances in the Dreaming down to over-active imaginations). Almost a century ago, Windsor McCay's Little Nemo in Slumberland strip began in the New York Herald: gorgeously drawn comics of a little dreamer's surreal adventures, always sharply concluded with Nemo awaking in his bed, sometimes falling from it. Nemo is surely a close cousin of Wynken, Blynken and Nod from Eugene Field's 1889 poem, three children taking to the dream-seas in a wooden shoe to fish among the stars.

Sleep isn't always a portal to a secondary fantasy world; sometimes opening the gate allows unknown entities access to the waking world. A recent example of this is FR Tallis's The Sleep Room, in which mentally ill patients are kept under, their perpetual slumber creating gateways for supernatural presences who lurk in the unknown dreamworld to pass through to reality.

Not all literary examinations of sleep are fantastical. Jonathan Coe's The House of Sleep is an exploration of what happens when we have too much sleep, and not enough. Dreams dribble into reality and the long hours of insomnia tick inexorably on.

While children resist sleep, having to be ushered up the wooden hill to Bedfordshire where a pre-Gaiman Sandman waits to sprinkle dust into their eyes and hasten them to Little Nemo-esque adventures in the land of Nod, adults feel they never have enough sleep. And mass insomnia has been the subject of a clutch of recent books that really do give a new meaning to night terrors.

Mention must be made of Stephen King's 1994 novel Insomnia, an odd tale by even his standards, in which a man is suddenly struck sleepless and begins to see lab-coated gremlins in a strange plot that ties it into King's Dark Tower series. But it is mass insomnia that has caught the imagination recently, perhaps beginning with Charlie Huston's Sleepless in 2010, a noir-ish SF thriller in which a BSE-type prion causes utter sleeplessness in 10% of the population, leading to chaos and martial law in the States.

Insomnia could well be the new zombie apocalypse, certainly if the two most recent novels in this vein are to be believed. Nod by Adrian Barnes, published by small West Yorkshire imprint Bluemoose early last year, found its way on to the Arthur C Clarke shortlist. Set in Vancouver, it posits an unexplained disaster, in which the vast majority of the world's population simply stop sleeping. Writer Paul is one of the very few who can still sleep, and finds himself at risk as the sleepless descend rapidly into madness and society collapses. Barnes explores the apocalypse on a localised scale as one of Paul's acquaintances, a homeless man called Charles, creates a community of exhausted insomniacs in Vancouver. Initially the mood is almost jolly, with echoes of GK Chesterton's The Naploeon of Notting Hill, but it quickly degenerates into a dark and nightmarish cult bent on the bloody murder of children who still hold the power of sleep.

Cut so much from the same dream-cloth that you might wonder if the two authors shared the same cheeseboard before bed one night is Kenneth Calhoun's Black Moon, published in the UK by Hogarth this month. Again, a never-explained bout of mass-sleeplessness affects the world, which once more swiftly spirals into lawlessness and the breakdown of society. Calhoun adds a grim touch to his insomnia epidemic: the sleepless are driven into fits of homicidal rage by the very presence of a sleeper, and the novel is a heart-stopping quest to reach a west coast military base where a rumoured cure is being developed, all the while avoiding the shambling, violent insomniacs desperate for sleep.

It's not a new idea, of course – witness Anton Chekhov's "Sleepy", in which a young sleep-deprived nurse is driven to strangle the baby in her charge – but these two books in particular are chilling simply because they are so close to home. If you've ever suffered from insomnia or even said how "wiped out" or "zombified" you feel after not enough sleep, you'll understand just how the world depends on our nightly rituals to continue.

Early in Nod, Adrian Barnes' narrator Paul says: "In sleep we all die, every one of us, every day. Why wasn't that fact noted more often? When we doze off each night there's never the slightest guarantee that we'll wake the next morning."

In sleep we surrender to the blackness, while prolonged wakefulness is the road to madness and damnation. If you can get to sleep tonight … sweet dreams.