Writing about nighttime seems an oddly Beckettian sort of enterprise, exploring a world in which nothing much seems to happen. Yet night, as A. Roger Ekirch demonstrates in this absorbing study, is by no means a realm for insomniacs and international telephone operators alone. For our early-modern ancestors, the darkness that descends on us each evening, far from being vacant and void, was dense, tangible stuff that literally fell from the sky. It was a thick soup of noisome fumes, dark contagions and pestilential blasts. Darkness was thronged with demonic powers and abducting elves, a medium that cruelly deprived people of their senses in a small-scale world where personal interaction was vital. Families needed to keep their possessions carefully in place so that they might find them in the dark, though the nocturnal sight of pre-industrial people was probably enhanced by their fruit-and-vegetable diet.

Smells, of which premodern Europe had more than enough, could help steer you to your destination. Dunghills and bakeries could act as signposts. Moonlight was a cherished commodity, and journeys were scheduled in accordance with it. Even so, darkness regularly caused our predecessors to topple into fireplaces, disappear drunkenly down potholes or be savaged by wolves and footpads. If you were particularly unlucky, you might find yourself showered by the urine and excrement that were ritually tipped into the street at night from high windows (though in the more civilized cities, it was customary to shout a warning).

Crime, then as now, posed a particular problem. Nightfall was the cue for thieves, smugglers and sheep stealers to get to work. Marauding bands of young bloods roamed about smashing doors, breaking jaws and cutting holes in roofs. In Denmark, burglars believed they could avoid detection by leaving behind their feces, scarcely a fair exchange for running off with your gold. The finger of a stillborn infant was also thought to be useful protection against arrest, and the wombs of pregnant women were occasionally cut open to extract their young. On the whole, the past was a nasty place to live in.

It is no wonder that this noxious medium known as night was announced by the ringing of bells, beating of drums and blowing of horns from watchtowers and ramparts. Townspeople hurried fearfully home before the gates of the city shut on them until dawn. The European towns of the sixteenth and seventeenth centuries were gated communities, and all women apart from midwives risked public disgrace if they did not keep to their homes. As in the United States today, a great many households were armed. If you did venture abroad, the law required you to carry a light to allow your rank to be identified by your clothes. Nighttime offenses received heavier punishment than daytime ones, and in Tudor England burglary was one of the crimes for which you could not escape the death penalty by claiming to be literate. (These days, the more liberal sort of judge might award you a lighter sentence for claiming to be illiterate.) Linkboys with torches could be hired for a fee, but some of the less conscientious were likely to lead you straight to their thieving mates and then extinguish the light.

Towns employed a night watch, whose regular loudmouthed cries tended to keep awake the very citizens whose sleep they were supposed to be safeguarding. In fact, premodern men and women probably took a lot longer to fall asleep than we do: two hours, perhaps, in contrast to the modern average of ten to fifteen minutes. Beds were among the important domestic possessions, bequeathed in wills to favored heirs. Shakespeare bequeathed his second-best bed to his wife, but this may have been less of a snub than we anachronistically imagine. Sleep was a precious commodity in a world where it was regularly interrupted by fear, cold, screams and vermin–so precious, in fact, that an eighteenth-century Connecticut woman shoveled a heap of hot embers into the gaping mouth of her snoring husband.

Yet night was not all fear and loathing. It was also a carnivalesque domain, where behind the mask of darkness you could achieve an autonomy denied to you in the day. And the licentiousness and disorder of night could be a kind of liberation. People regularly shared their beds with friends, relatives and servants for warmth and security, but also for less utilitarian reasons. Besides, if you took so long to fall asleep, you needed someone to talk to. In Tuscany, la notte was a euphemism for sodomy, while in England homosexuals assembled at night at so-called molly houses. “Nightwalker” meant prostitute, a trade plied by one-tenth of the population of Venice in the early sixteenth century.

There were other forms of license as well: In a society of punitive work disciplines, night could bring relief to the overtaxed laborer. The medieval guilds saw to it that many kinds of nocturnal work were illegal, which is more than can be said for modern trade unions. Even so, then as now, numerous men and women toiled far into the night. (The percentage of night workers in Britain today, for example, is astonishingly high.) Women, among the hardest workers, spent the night spinning, knitting and weaving, while so-called nightmen emptied the cesspools. The bodies of the dead were carted off at night during epidemics.

Yet if some preindustrial people worked through the night, others partied their way through it. Formalities fell by the wayside, to be replaced by sexual frolics for the lower classes and lavish entertainments for the patricians. Aristocratic young blades went berserk and wandered the streets in gangs with servants in tow, howling, brawling and attacking innocent pedestrians (Britain’s Prince Harry was born after his time). Political subversives caballed by night and circulated incendiary broadsheets under cover of darkness. “In [eighteenth-century] Britain,” Ekirch writes, “apprentices, hedge-breakers, Spitalfields weavers, and Jacobins all drew on a longstanding tradition of nocturnal revelry and resistance, as did vandals of turnpikes and dikes.” So did the Whiteboys of what he rather quaintly calls “southern Ireland,” though at the time there was no such political entity.

This, however, is a rare lapse in a fascinating survey. Ekirch, a historian at Virginia Tech, has plundered an extraordinary range of cross-cultural sources for his material, and he tells us about everything from witches to firefighting, architecture to domestic violence. He must have lost a fair amount of sleep in writing this monumental study. In an unwonted outburst of Marxist analysis, we even learn about class distinction in candles between upper-class wax, middle-class tallow and lower-class rush light. The riffling of the card index, or its technological equivalent, can be heard rather too clearly throughout: The book is too much a tapestry of allusions, too little a reflective commentary. But At Day’s Close has everything you need to know about what used to happen before the sun came up–or before the earth went down, as the modern theory has it.