If you’ve suddenly found yourself working from home, you aren’t alone. Thanks to the COVID-19 pandemic, more people than ever before are working from home, with no sign of returning to the office anytime soon. Although there are some distinct advantages to staying home (hello, sweatpants!) when the only space you have available for work is in your bedroom, it’s easy to feel like there’s literally no separation between your work and personal lives.

In fact, most sleep experts caution against turning your bedroom into a home office. Ideally, bedrooms should be reserved for sleep only. Working in your bedroom — or even worse, in bed — can affect your perception of the space and keep you awake at night. That’s not even considering the likelihood that you’ll roll out of bed and straight to work, or even get up in the middle of the night to answer emails or complete other tasks instead of getting much needed shuteye. In short, a bedroom/office isn’t always conducive to healthy sleep habits.

That said, your bedroom might be your only option right now. If you have a small home or apartment, or if the bedroom is the only room with a door and enough space for you to work in, you could be forced to turn your sanctuary into your workplace. That doesn’t have to be detrimental to your sleep schedule and mental well-being, though. Here’s how you can make it work.

Set Boundaries

When you work from home, the most important thing for your mental health is to set boundaries, both physical and metaphorical. Your employer doesn’t (and shouldn’t) expect you to be available at all hours just because you aren’t physically in the office. You need to establish clear boundaries as to when you are and aren’t available. This means turning off your computer, silencing notifications, and not responding to messages outside of office hours. This doesn’t mean you might not occasionally work longer than usual, but it shouldn’t be a habit just because you’re at home.

Just as important, though, are the physical boundaries you establish between your work and home life. A separate office is ideal because you can close the door when you “leave work” for the day. If your office is the corner of your bedroom, that’s not as easily done. You may need to temporarily make changes to your space to accommodate this separation. For example, can you move clothing from the closet, and put a small desk in there? This way, you can close the closet door at the end of the day. If that’s not possible, try placing a tall screen around the work area to hide your desk behind it. Anything you can do to physically separate your sleep and work areas can help preserve your sleep time.

Hide Your Devices

Even when you separate your work and sleep areas, your devices are still online. An important part of maintaining separation is putting your devices to bed at night, too. When it’s time for sleep, put your phone in a drawer, or the laptop in the “office,” and leave it there until morning. The blue light emitted by electronics can disrupt melatonin production, keeping you awake and messing with your sleep cycle.

Don’t Work in Bed

One of the worst things you can do when working from home is to work in bed. Not only should your bed be saved for sleeping, but sitting in bed for long hours isn’t good for your posture and can increase your risk of ailments like carpal tunnel syndrome. Never mind that leaning up against your wood bed frame all day isn’t likely to be very comfortable — and awkward on Zoom.

Although it might be a tight squeeze in a small space, set up a separate workspace with an ergonomic chair that will support your back and be comfortable all day. A desk or table is also a must; if necessary, place your computer or monitor on a riser or stack of books to ensure it’s at eye level and you don’t need to strain your neck or back to see it.

Take Breaks

When you’re working from your bedroom, it’s even more important than usual to take regular breaks. Otherwise, you could end up spending most of your time in the same room, which isn’t healthy. Never eat in your bedroom, and make a point of spending time in other rooms in your home or better yet, outdoors when you can. A change of scenery can do wonders for your mental health, creativity, and productivity. And eventually, when life returns to normal and you can reclaim your bedroom, you won’t hate it and never want to set foot in there again.