In terms of rude awakenings, it was a bad one. During a bout of sleepwalking one night when I was 15, I mistook a dorm-mate for a bomb. I dragged him off his bed and along the floor, opened the door, placed him underneath the snooker table outside and told everyone to get down because he was about to blow up.
The tragedy of the situation was that the "bomb" was a gentle, misunderstood young man who was constantly tormented in his waking hours; sleep must have been his only sanctuary, and even then he was misunderstood (to be an explosive).
Failing to observe the rule that you must never wake a sleepwalker, the rest of the dormitory told me to "shut the fuck up". To this day I have no recollection of the event up until the point of being woken, but six teenage boys can't be wrong and the incident was not isolated. My fellow boarders had already suffered nights when I had woken up screaming, emptied out the contents of cupboards and lockers, rained books and cassettes on to their heads in a desperate search for some imaginary holy grail. I only found out about these nocturnal adventures the following morning, and invariably remembered nothing.
Somnambulism is the most visually dramatic of all sleep disorders. Sleepwalkers do not stiffly stagger about like zombies with their arms outstretched, but they do move in a confused, clumsy manner, often anxiously searching for something with great purpose. A sleepwalker's eyes are open but unseeing, and their minds are unresponsive to what is going on around them. This gives a potential for danger.
There were two occasions during adolescence when my parents found me sitting on the roof of our house, having crawled out of my bedroom window, and about five years ago my girlfriend managed to stop me just before I walked out of her flat and on to Clapham Common. Although she lived near a dense copse where naked men were not a particularly unusual night-time sight, this could have led to all sorts of trouble and I'm grateful for her intervention.
Sleepwalking is still mysterious, not least to the people suffering from it. It is common in childhood and rare in adulthood, has a pattern of heredity, and seems to be anxiety-triggered: the loss of a favourite toy or simply a frustrating day can cause bouts of sleepwalking. It occurs during non-REM "slow wave" sleep - within the first two hours, which is the deepest period - and an average episode lasts for five to 15 minutes, but it can go on for as long as half an hour. (REM - rapid eye movement - sleep is a mentally active period during which dreaming occurs.)
"Typically, the sleepwalker appears to be looking for something," says Professor Jim Horne, director of the sleep research centre at Loughborough University and editor of the Journal of Sleep Research. "But they are deeply asleep and very difficult to arouse. They have their own intentions and all you will get if you try and reason with them is a mumbled response."
Sleepwalking can be a disconcerting sight for any parent, but the important thing is to not make an issue of it - any undue worry will be picked up by the child and exacerbate the condition. It happens typically when the child undergoes an incomplete arousal from deep sleep. The conscious brain is not engaged, leading to a state of non-insane automatonism: this means that the sleepwalker typically carries out everyday acts with a confused purpose, such as peeing in a cupboard or turning lights on and off randomly.
"Because it is anxiety-related, the best thing for parents to do is try and understand what the child is worrying about," says Horne. "I had a case in which the child went downstairs and started watching television with the parents. The father thought the child was being disobedient and hit him, which made him wake up and start screaming inconsolably. If the child is given proper parental support, then these episodes will often resolve themselves."
There are, however, those episodes that only resolve themselves well into adulthood. My last reported bout of sleepwalking happened when I was 25, when my girlfriend woke up to see me standing in front of the bed, trying on her grandfather's bowler hat.
"A precondition of sleepwalking is deep sleep, which is why it is more common in children," explains Professor Colin Espie, head of Glasgow University's psychological medicine department. "Deep sleep happens less and less as we get older, but we can still have a homeostatic drive for it - if we are overtired, for example, or if we have been using alcohol, which can concentrate deep sleep but also cause confusional arousal - it fractures the sleeping process."
This can lead to some tricky legal situations. Espie dealt with a case in which a Dundee man was arrested for drink-driving, despite the fact that he was fast asleep. Technically, he was driving under intoxication, but he did not have any conscious will to be driving in the first place.
Sleepwalking and night-terror - in which the mind processes something from the environment and misunderstands it, leading to hallucinations and irrational fear - are forms of parasomnia and entirely distinct from dreaming. "With dreaming there is a narrative, but in sleepwalking and night-terror all you have are single images and emotional sensations," says Espie. "With parasomnia people are acting; they're up and about. In dreaming the body is paralysed."
Ultimately, nobody really knows what causes sleepwalking, only what gives certain people a predisposition towards it in certain situations: heredity and anxiety, coupled with deep sleep and external arousal. In my case, traditional British repression seems to be at the root of it. "A boarding school is exactly the kind of place where you can't express your emotions," says Espie. "This is a generalisation, but someone who is repressing emotion is likely to be predisposed towards sleepwalking. My advice is to treat the nocturnal behaviour as a friend who is trying to tell you something."
The best prevention is avoidance of sleep deprivation and alcohol, and parents can help to stop their children sleepwalking by trying to understand what is troubling them. "There are drugs that can be prescribed," concludes Horne, "but ultimately the best treatment is always going to be love and care."