One night in 1811, and for many nights thereafter, a young woman named Rachel Baker rose from her bed in Marcellus, New York, and — apparently in a sleeping state — announced that she was going to die and proceeded to pour out a sermon of religious dread and impending doom. Baker came from a Presbyterian family that was caught up in the fervor of the Great Awakening’s revival movement centered in Onondaga County, the heart of the so-called “Burned-Over District” (so named because its inhabitants had all been converted, leaving no “fuel” left over for the fire of faith to ignite). According to a local minister, she formed strong religious sentiments early in life, and from the age of nine, “the thoughts of God and eternity would make her tremble.” During her waking hours, she was meek and proper; before bed, she offered her nightly devotions with decorous expressions of love and gratitude for her maker. There was nothing particularly striking about her waking self: in the words of her minister, she was “far from possessing very quick perceptions, a penetrating discernment, or lively sensations.” But in the middle of the night she took on personality traits that veered between the disturbing and the miraculous. The episodes began with her “sighing and groaning, as if in excessive pain, which caused great alarm to the family.” She then began to talk in a disordered way, “like one somewhat deranged. . . . [S]he would be one minute begging for mercy like one in extreme anguish; another minute warning her mates, telling them not to do as she had done, but to take warning by her; she was going down to hell!”

By the time she was nineteen, Baker was attracting curious onlookers, who gathered around her bedside to hear her “evening exercises,” which began with prayer, then exhortation, and a closing prayer. One of the thirty or forty neighbors who showed up described her as a “plump, hale country lass, . . . rather above the middle size,” with a “tranquil” face that showed no sign of “mental vivacity or vigor.” Yet apparently in the midst of sleep, she gazed at her visitors with an “unsteady, wild and capricious” eye distorted by “sickly dilation of the pupil.” She prayed for the church, the minister, and sinners alike, asking “that God would give them a sense of their danger, and enable them to apply to the Saviour, who is willing to save all them that come unto him, even the chief of sinners.” She seemed to refer obliquely to her own sleeping state by exhorting the sinners to stay awake: “She would beg them not to give sleep to their eyes, nor slumber to their eye-lids, till they had made their peace with God.” Her public sleep-talking went on in this way for two months, after which it reached a dramatic apex: “Soon after she went to bed, she was seized with horror and trembling; she gave a loud shriek, and awoke greatly terrified with a sense of her deplorable condition. . . . She said that one of the infernal fiends was grasping her, and would drag her down to the bottomless pit! A fathomless abyss! A dread eternity in full view!” Baker’s family rushed to comfort her, assuring her that her sins were all forgiven, and she announced that henceforth she would only praise and bless the holy name of God. The horrifying vision seemed to create a spiritual breakthrough for her, and throngs of as many as three hundred people began to visit her nightly. She did not disappoint.

In these nocturnal visitations, after half an hour of prayer, Baker’s chest began to heave, she grated her teeth, her breathing became irregular, and her moans filled her visitors with dread. One night, her eye met that of a visiting church elder, and she told him of “the shuddering terrors of eternal damnation”; her warnings of mortal danger caused visitors to “shudder and shiver in sublimity.” But then her sleeping incarnation composed itself, and she delivered an address full of learned reference to scriptures in a commanding voice. At the end of her sermons, she would shake violently, as if casting off an unseen tormentor, and then collapse on her bed, “colourless as the dead.” Despite such terrifying performances, many visitors were struck by her lucidity and composure. Astonishingly, despite the fact that in her waking state she “[did] not appear to be possessed of a clear mind in the scriptures, a retentive memory, nor a good judgment,” her sleeping sermons exhibited a minute understanding of “the great doctrines of grace” that testified to “eminent attainments in Christian knowledge.”

Baker’s deranged sleep — if that’s what it was — was interpreted entirely as a spiritual matter, as such altered states of consciousness had been understood for centuries or even millennia. Scattered reports of sleepwalking and sleeptalking go back to ancient times, and they were often associated with religious visions that might be manifest in fits, trances, and convulsions. All of these phenomena were thought to emanate from an alternating consciousness that was caught between the earthly and the sublime, the angelic and the demonic, an ascent up to heaven and a slide into hell. It was after one of his visions that the apostle Paul had said, “It is no longer I who live, but Christ who lives in me”; upon seeing lights and hearing voices, he wondered “whether [I was] in the body or out of the body.” Ministers in colonial New England had feared this sort of experience, especially when it took place at night, and even more so when women and girls were the ones arising from their beds in this disordered and untimely way to explore the supernatural world. The Salem witch trials were only the most famous instance of women getting up to no good under such circumstances. Ecstatic experiences and trances received the approval of authorities only when they took place in the proper time and place: otherwise, they might be evidence of witchcraft, spirit possession, rebelliousness, or even prostitution.

In the eighteenth century in Europe and North America, mainstream religious authorities began to challenge the spiritual interpretation of such unruly sleep, often drawing on the rationalistic worldview of philosophers and scientists, who viewed it as evidence of mental instability rather than religious inspiration or demonic possession. The clash of scientific and theological interpretations of sleepwalking and associated altered states became a matter of public concern shortly after a group of French Huguenots, who had been expelled from France when Protestantism was outlawed there, arrived in London in the early eighteenth century. These so-called “French prophets” all reported common mystical experiences: the young women in their group frequently fell faint or swooned and began to “Prophesie and Preach in their Sleep,” generally without any memory of the event when they awoke. Opponents of the immigrants and their unsettling religious behaviors refused to acknowledge the validity of these spiritual states. Instead of religion, they saw “enthusiasm,” a term that connoted mental imbalance and false religious impressions, and was often used to tar opponents as being both dangerously radical and mad. As much as a century later, leaders of the revival movements, in part because they gave credence to the ecstatic, sometimes somnambulistic, voices of women and others of low status (such as Rachel Baker), were often referred to dismissively as “French prophets” and charged with promoting social unrest. By encouraging those who lived on the margins of society to proclaim their spiritual visions in public, the revivalists elicited the scorn of the more established religious leaders of the late eighteenth and early nineteenth centuries, who considered such uncensored outpourings to be dangerous, even possibly dangerous enough to promote the spread of insanity. Old-line Congregationalist minister Charles Chauncy found such enthusiasm to result from “bad temperament of the blood and spirits.” Because of “the Weakness of their Nerves, and from hence their greater Liableness to be surpris’d, and overcome with Fear,” women — in his view — were more prone to be thrown into “these Agitations and Terrors” than were men.

Nonetheless, sleepwalkers continued to enthrall onlookers on both sides of the Atlantic. Even strict rationalists admitted that such behaviors existed, and that often, they came bundled with extraordinary powers. Wrote physician John Bell in 1788, “People struck with Somnambulism, given up to a sound sleep, walk, talk, write and perform many other actions as if they were awake; nay, even sometimes with more discernment and exactitude.” There were other notable examples: A late eighteenth-century Swiss teenager could reportedly eat, drink, and dress himself while sleeping without aid of light, even composing a complex piece of music in that state. A divinity student in Bordeaux composed sermons and musical works more elegant than those he was capable of producing while awake. A poet who published his sleep-writing attracted favorable notice in Britain.

Not surprisingly, sleepwalking was often understood as an eruption of special mental powers associated with genius, an explanation that some in the medical community accepted. But it could also indicate disease of the brain. Preeminent American physician Benjamin Rush (a signer of the Declaration of Independence) treated sleepwalking as a rather straightforward medical problem that could be cured by bleeding, gentle purges, low diet, exercise, and perhaps a “draught of porter, a glass of wine, or a dose of opium.” He explained that sleepwalkers have nervous systems that are “so free, as that vibrations can descend from the internal parts of the brain, the peculiar residence of ideas, into them.” He viewed somnambulism as “a higher grade” of dreaming, or “a transient paroxysm of madness”: “Like madness,” he wrote, “it is accompanied with muscular action, with incoherent, or coherent conduct, and with that complete oblivion of both, which takes place in the worst grade of madness.” It is a state in which complex activities can be undertaken — “the scholar resuming his studies, the poet his pen, and the artisan his labours . . . with their usual industry, taste and correctness.” Novelist Charles Brockden Brown took this idea of sleepwalking-as-madness to its logical conclusion, picturing in his gripping 1799 novel Edgar Huntly; or, Memoirs of a Sleepwalker a man who commits murders in his sleep. He is captured and taken to a lunatic asylum — a fate that predicted the case of a notorious American killer in 1833 who was the first to claim the sleepwalking defense in court.

Older, nonscientific interpretations of sleepwalking (and sleep generally) persisted through the nineteenth century, although they weren’t always tied to the frameworks of organized religion. Reports of the experience of sleepwalkers frequently included supernatural abilities. A Rhode Island woman was said to be able to leave her body during sleep: when she “travel[ed]” to New York in this manner, she described the pictures on the wall of her physician’s house in the city and suffered seasickness on a steamboat ride across the Long Island Sound. A German woman reported visiting the moon. A Scottish sleepwalker spontaneously learned tenets of astronomy and geography. A young man in Gloucester, Massachusetts, published a long account of a mystical experience that he claimed he had only been able to write while holding a pen in his teeth during sleep. And another young woman, from Rachel Baker’s upstate New York, claimed that during her sleep she had visited the borders of a lake where she encountered “continual weeping and lamentation”: she almost fell in. Her vision of a deranged man lunging after her from out of the lake of fire, unable to reach her only because of the chains holding him back, is horrifying. But she was then treated to a view of Christ with angels cavorting about him before being returned to her sleeping body. For all of the remarkable features of Baker’s case, it was not particularly original, but it did clearly fall under the heading of religious trance, rather than medical problem.

Medical interest in Baker’s case eventually followed the hubbub over her performances. In 1813, she went to New York City to stay with her aunt, and there, away from the revivalist culture of her frontier community in Marcellus, she came into contact with medical men who had absorbed some of the most advanced teachings from Europe. Unlike Lady Macbeth’s doctor, these early nineteenth-century doctors were not always willing to cede authority over such fantastical behavior to the “divines”; they had little interest in the immaterial soul, and instead offered explanations of the behavior that were based on the idea that the body, including the brain, was a machine that ran on regular principles. It was these doctors who were, in a small way, responsible for turning sleep and its derangements into a medical problem rather than a spiritual threat (or opportunity, depending on your perspective).

Adapted excerpt from WILD NIGHTS: How Taming Sleep Created Our Restless World by Benjamin Reiss. Copyright © 2017. Available from Basic Books, an imprint of Perseus Books, LLC, a subsidiary of Hachette Book Group, Inc.

Originally published at medium.com