When I was a boy I had a recurring dream that Lilliputian figures were scurrying under my bed. I can’t recall if they bound my hands and feet like Gulliver, but I certainly found their activities fascinating and made no effort to resist, even when, on occasion, they succeeded in moving my bed slightly to the left or right.

Every now and then, however, they would push the bed a little too close to the window. That I did not like, because it put me in range of the clown waiting on the balcony (I have always been terrified by clowns). Now, frozen by fear, I really was immobilised and it was only by screaming that I could snap myself awake and escape their night-time peregrinations.

I was reminded of my lucid dream by the story of Donal, one of the patients featured in Brainstorm, Suzanne O’Sullivan’s new book of “detective stories from the world of neurology”. For 30 years Donal led a perfectly ordinary and seemingly contented life as a school janitor. Then one day he was summoned to the headmistress’s office and informed the school was making cuts and his job might be in jeopardy. That’s when he first saw the dwarves – “seven small brightly coloured men”, as Donal put it – scamper across the room and disappear behind the headmistress’s filing cabinet. As you can imagine, at first Donal told no one, but when one night the dwarves appeared beneath his bed and he gripped his wife’s arm in fright, he was forced to come clean and seek medical help.

Those of us who have “normal” brains take our waking lives for granted. Levitating beds and cartoon characters are all very well for the dream world, but when we awake we expect to find the bus stop to be in the same place that we left it yesterday and the street to be the same reassuring shade of grey. But unusual spikes in electrical activity can happen to anyone at any time, sparking transient phenomena such as goosebumps or deja vu, which feel all too real at the time. Moreover, whether as a result of genetic abnormalities, hormonal imbalances, or microscopic lesions, some brains are wired or fire differently. Neurons responsible for one function get crossed with another and suddenly pains take on distinctive tastes, we begin to see vivid auras or are able to access long-lost memories or, conversely, can remember nothing at all and are condemned to the purgatory of the perpetual present.

As one would expect from a neurologist in the Oliver Sacks tradition, O’Sullivan is a sure guide to these maverick brains and strange auras – a word, she reminds us, that is Greek for “breeze” and was originally used in the context of epilepsy. And like the late Dr Sacks, she is careful not to pass judgment on her patients, studiously parsing their accounts of hallucinations and seizures for clues to the underlying neurological dysfunction. Thus, rather than dismiss Donal as a fantasist or someone with psychiatric problems when an MRI scan of his brain proves normal, O’Sullivan hooks him up to an EEG (electroencephalogram) and has him sleep for several days in her epilepsy clinic to monitor and film his seizures. In this way, she finally captures the sudden telltale increase in electrical impulses that attends the dwarves’ appearance and recognises it as a seizure affecting Donal’s occipital lobe, the brain region that controls visual phenomena. Why dwarves, and precisely what triggers these seizures she cannot say, but by giving Donal medication to control his hallucinations she restores his mental equilibrium.

The individuals canvassed in science writer Helen Thomson’s book Unthinkable are not so fortunate. The manifestations of their strange brains cannot be so easily treated, nor, in many cases, would they wish them to be. Take Bob. He can recall a day from 40 years ago as easily as yesterday. Not just who he was with and what the weather was like, but his exact thoughts and sensations. Sometimes, as when the experience was unpleasant, these memories can be a source of pain. But replaying such memories also enables Bob to learn from his mistakes and, in the case of a lost loved one, his extraordinary memory allows him to travel back in time. Indeed, Bob makes a point of memorising relationships that are valuable to him, the better to be able to relive them later.

According to Thomson, we can learn a lot from people like Bob. She too takes inspiration from Sacks, but not being a neurologist, she cannot bring us diverting tales from the bedside. Instead, Thomson makes a virtue of her limitations by travelling the world in search of “strange brains” in an effort to understand them as a “friend might”. It is, for the most part, a successful strategy and although I did not fully buy her claims to have entered her subjects’ peculiar sensory universes, by the end of her journey she had certainly persuaded me to see the world differently.

Take Reuben. Born with red-green colour blindness, Reuben nonetheless claims to be able to “see” vivid auras enveloping people and objects (someone to whom he is sexually attracted flashes red; those he dislikes are yellow, a colour he associates with sourness). The technical term for Reuben’s condition is synaesthesia (crossed senses) and, in case you think he’s faking, his colour blindness and ability to consistently identify coloured auras has been confirmed by rigorous scientific tests. But knowing that does not capture the mysterious nature of Reuben’s colour spectrum or indeed anyone else’s. In short, though we can both objectively agree that such and such an object is red, I cannot be certain that my subjective experience of redness is the same as yours.

It's as if when he zapped himself in the bath he also zapped his sense of self

But we can both agree that we are alive, otherwise how would we be conversing and exchanging notes about redness? Or can we? Graham can happily talk about redness, but insists he is dead. Specifically, Graham is convinced he is brain dead and finds living so pointless he sometimes forgets to eat – after all, if you’re dead what’s the point? Graham can trace his conviction to the day he tried to commit suicide by getting into a bath with a hairdryer after his wife left him. Afterwards, PET scans of his brain showed almost no metabolic activity in the regions governing his ability to rationalise and reflect on his own existence. The result is that even though Graham has been told he is suffering from a rare syndrome known as Cotard’s, no one can convince him he is alive. It’s as if when he zapped himself in the bath he also zapped his sense of self.

Of course, as with Donal and his dwarves, Graham’s abnormally low brain activity may be the physical manifestation of an underlying psychopathology. But that doesn’t detract from the realness of his symptoms to him. Maybe one day doctors will find a way to turn Graham’s brain back on but, until then, Thomson argues that his sense of being a member of the “waking dead” deserves to be taken seriously, offering yet another clue to the mysterious wizard behind the curtain.

That is a verdict with which O’Sullivan would concur. For all the advances in neurology – from MRI scans and EEG to the mapping of neurons for particular conditions, to new genetic techniques – she points out that cures for conditions such as epilepsy, Parkinson’s, autism and schizophrenia remain tantalisingly out of reach. That is why when it comes to probing the mysteries of our most complex organ there is no substitute for patients’ subjective accounts of their misbehaving brains. Even the names patients use to encapsulate their experience may contain vital clues. “When I record a patient’s seizures in their notes I always include these names,” she writes. “They are more vivid than any medical terminology.”

• Brainstorm by Suzanne O’Sullivan is published by Chatto & Windus (£16.99). Unthinkable by Helen Thomson is published by John Murray (£20). To order a copy of Brainstorm for £14.44 or Unthinkable for £17 go to guardianbookshop.com or call 0330 333 6846. Free UK p&p over £10, online orders only. Phone orders min p&p of £1.99