For years, sleep experts have held one piece of common wisdom above all else: Don't work from bed.

Yet since the pandemic began in March, millions of Americans have defied that guidance. They are drafting legal documents, producing events, holding client calls, coding, e-mailing, studying and writing, all from under the covers.

This wasn't always the plan. Early on, many of them invested in desks and other equipment meant to make their homes as ergonomically sound and office-like as possible.

When New York City shut down in March, Vanessa Anderson, 24, set up a desk for herself in her living room. She was working for an agency that manages private chefs and wanted to keep some semblance of separation between work and sleep. "For a while I was really committed to not working from my bedroom at all," she said.

In May, Anderson moved her desk into her bedroom for more light. "My bed was just sitting there, taunting me," she said. She set ground rules for herself: She'd get in bed only after 2 p.m., but that start time gradually moved earlier. By July, her bed had become her full-time office.

Talking to others, she's discovered how commonplace the practice is.

"I've been on calls with people where we were both in bed," she said. "At the end of the call it's like, 'How's the pandemic going? Oh, you're in bed right now, too? So am I!' "

Working from bed was embraced by some of history's most accomplished figures. Frida Kahlo painted masterpieces from her canopy bed. Winston Churchill, a notorious late riser even during World War II, dictated to typists while breakfasting in bed. Edith Wharton, William Wordsworth and Marcel Proust drafted prose and verse from their beds.

The bedroom can be a refuge from the chaos of home life. Parents retreat there to hide from their homebound children. Others are fleeing roommates.

"I think one of the things we're learning is that we're all in tight places figuratively and literally — especially if you have a roommate or spouse, there just isn't enough real estate in your home to have the privacy to get your work done," said Sam Stephens, 35, a singer and songwriter in Nashville.

Working from bed also might be symptomatic of collective malaise.

"I spend way more time working from bed even though I have a computer, office chair and desk," said Abelina Rios, 26, a YouTuber in Los Angeles. "I think everybody is feeling depressed from the pandemic, and when you're depressed, one of the harder things to do is to get out of bed."

Embrace the idea

Liz Fosslien, 33, an author of "No Hard Feelings," a book about how emotions affect work, brings her computer into bed with her every morning. Her advice to anyone doing the same: "Don't beat yourself up for it. It is easy to be like, 'Ugh, I'm in my pajamas, I haven't washed my hair, what am I doing,' but it's really about the quality of your output."

A primary argument against using devices in bed is that it can further erode the boundaries between work and home, and disrupt your sleep cycle. But even Arianna Huffington, the media executive turned sleep evangelist, has found herself working from bed since the pandemic hit.

"I think it can work great for people, but it's critical to have certain boundaries," she said. Huffington suggests having a hard stop on work hours and then storing your electronics in another room.

Proponents of desk culture used to argue that there's no way someone can be productive from bed.

"I know tons of people who work in bed (my husband, for instance). I think they're all a bunch of lazy, bedsore-prone, rapidly deteriorating slobs," writer Susan Orlean told the New Republic in 2013. "Or maybe they're much, much happier (and smarter) than the rest of us."

But what many homebound workers are realizing during the pandemic is that it's perfectly possible to hold down a job remotely from bed.

"We have data showing time crafting is good for happiness, if you're able to work from anywhere and you choose to work from bed this is one example of time crafting," said Ashley Whillans, an assistant professor at Harvard Business School. "Picking where to work and how to get work done can improve employee satisfaction."

Hoping for change

Tessa Miller, 32, author of the book "What Doesn't Kill You" about her struggles with chronic illness, has been working from bed for nine years.

"I think that the pandemic is highlighting all these things that chronically ill and disabled people have been doing for a long time, and now everyone is doing them as well, and working from bed is one of them," she said. "I know a lot of highly productive, intelligent, talented people who have to work from bed as a necessity."

Those with chronic illness or disabilities say that they hope that, much as the way the pandemic has made companies more open to remote work, the stigma around working from bed will also be broken.

"I hope one of the things that come out of this is it reveals you can still do good work from your bed, or bathtub, or living room sofa with a heating pad, and I hope that will create opportunities for people who are chronically ill or disabled in fields they maybe didn't feel welcome in before," Miller said.

Abie Sidell, 27, a filmmaker in New York, often works from bed because of his chronic illness, but he has found it helpful even when he's not having a flare-up. If he's stuck on a project or needs to think, he'll lie down.

"Being in bed is great," he said. "I wish, in general, there were fewer norms and standards around where it is and isn't acceptable to work."