Groucho Marx once joked, "Anything that can't be done in bed isn't worth doing at all." You might think he was referring to sleeping and sex. But humans, at one time or another, have done just about everything in bed.
And yet, despite the fact that we spend one-third of our lives in bed, they're more of an afterthought.
I certainly didn't think much about beds until I found myself talking about their history with the executives of a mattress company. These humble artifacts, I learned, had a big story to tell - one that's 77,000 years old.
That's when, according to archaeologist Lynn Wadley, our early African ancestors started to sleep in hollows dug out of cave floors - the first beds. They wrapped themselves in insect-repelling grasses to avoid bed bugs as persistent as those of today's seedy motels.
Much about our beds have remained unchanged for centuries. But one aspect of the bed has undergone a dramatic shift.
Today, we usually sleep in bedrooms with the door shut firmly behind us. They're the ultimate realm of privacy. No one else is allowed in them, aside from a spouse or lover.
But as I show in my forthcoming book, "What We did in Bed," it wasn't always this way.
Beds full of 'buck and babble'
The structure of the bed has remained remarkably consistent: We know that raised frames with mattresses were being used in Malta and Egypt by 3000 B.C., which means that people have been using them for over 5,000 years.
Early Egyptian beds were little more than rectangular wooden frames with legs and leather or fabric sleeping platforms. The upper end was often angled slightly upwards. Grass, hay and straw stuffed into sacks or cloth bags served as a scratchy mattress for centuries.
But one thing that has changed is who has occupied the bed. For most of human history, people thought nothing of crowding family members or friends into the same bed.
The 17th-century diarist Samuel Pepys often slept with male friends and rated their conversation skills. One of his favorites was the "merry Mr. Creed," who provided "excellent company." In September 1776, John Adams and Benjamin Franklin famously shared a bed in a New Jersey inn with only one small window. Adams kept it shut, but Franklin wanted it open, complaining that he would suffocate without fresh air. Adams won the battle.
Travelers often slept with strangers. In China and Mongolia, kangs - heated stone platforms - were used in inns as early as 5000 B.C. Guests supplied the bedding and slept with fellow tourists.
Bedding down with strangers could lead to some awkwardness. The 16th-century English poet Andrew Buckley complained of bedmates who "buck and babble, some commeth drunk to bed."
Then there was the Great Bed of Ware - a massive bed kept in an inn in a small town in entral England. Built with richly decorated oak around 1590, the four-post bed is about the size of two modern double beds. Twenty-six butchers and their wives - a total of 52 people - are said to have spent a night in the Great Bed in 1689.
While regular people crammed into beds, royalty often slept alone or with their spouse. But their bedrooms were hardly bastions of privacy.
The ceremonial bedding of newlyweds was a public spectacle for a royal court. After a royal wedding, a form of symbolic intercourse often occurred in front of numerous witnesses.
After the feast, the bride was undressed by her ladies and put to bed. The groom would then arrive in his nightshirt, sometimes accompanied by musicians. The bed curtains were then drawn, yet the guests sometimes wouldn't leave until they saw the couple's naked legs touching, or heard suggestive noises. The following morning, the stained bed linen was displayed as proof of consummation.
And why go to an office when you can rule from the bedroom? Each morning, Louis XIV of France would sit in his bed, bolstered by pillows, and preside over elaborate gatherings. Surrounded by courtiers like the gossipy Lord Saint-Simon, he composed decrees and consulted with high officials.
During the 19th century, beds and bedrooms gradually became private spheres. A major impetus was rapid urbanization during the Industrial Revolution. In cities, compact row houses were constructed with small rooms, each with a specific purpose, one of which was sleeping.
Another reason was religion. The Victorian era was a devout age, and Evangelical Christianity was pervasive by the 1830s. Such beliefs placed great emphasis on marriage, chastity, the family, and the bond between parent and child; allowing strangers or friends under the covers was no longer kosher. By 1875, Architect magazine had published an essay declaring that a bedroom used for anything other than sleeping was unwholesome and immoral.
Bedrooms reserved for adults and children became commonplace in affluent 19th century homes. Husbands and wives sometimes even had separate bedrooms, perhaps connected by a door, each with their own adjoining dressing rooms.
Self-help books advised Victorian housewives about how to decorate their bedrooms. In 1888, writer and interior decorator Jane Ellen Panton recommended bright colors, washstands, chamber pots and, above all, a "long chair," where a wife could rest when overwhelmed.
Tech knocks down the door
Today, bedrooms are still considered sanctuaries - a calming place to recuperate from the chaos of everyday life. Portable technology, however, has wormed its way under our covers.
A survey from earlier this year found that 80% of teens brought their mobile devices into their bedrooms at night; nearly one-third slept with them.
In a way, technology has reverted the bed to its earlier role: a place to socialize - chatting with friends, maybe even strangers - late into the night. And we can only wonder how many tweets President Trump has composed while burrowed under his blankets.
But in some ways, the effects of these glowing bedmates seem to be a bit more pernicious. One study surveyed couples who brought their smartphones to bed with them; more than half said the devices caused them to miss out on quality time with their partner. In another study, participants who banished smartphones from the bedroom reported being happier and having a better quality of life. Maybe that's because these devices eat into our sleep.
Then again, I'm not so sure my sleep would be much better if I were to bed down with drunk strangers, as Andrew Buckley did.
Nadia Durrani is a contributing author of this article.
Author: Brian Fagan - Distinguished Professor Emeritus in Anthropology, University of California, Santa Barbara