Working from home almost always seems like a good idea, doubly so on a Thursday morning. You’d get to sleep in, work from the couch, spend all day in your underwear, and maybe hit some Netflix when you need a break. In theory, it’s awesome.

Then cabin fever sets in. Before you know it, you’ve grown an unintentional beard and the Seamless guy has learned to interpret your grunts. A decision that was supposed to make you more efficient and comfortable has transformed you from a human into a cave dweller. This is why Yahoo’s Marissa Mayer is leading the work-from-home backlash even as more companies try to help their employees stay flexible.

Working from home, it turns out, is neither bad nor good. It’s hard. You’ve got to have a strategy. To that end, we spoke to a psychologist about how best to manage oneself.

1. Get in Touch

Dr. Ben Dattner, part of New York University’s Faculty of Psychology and an organizational development consultant, says that interaction is key to productivity and retained sanity. If it’s not possible to head outside the house, scheduling phone calls with friends and family throughout the day will help maintain the semblance of regular human contact, says Dattner. Plus, it’s always nice to have someone check in to see if you’re still alive.

2. Get in a Hangout

If you know you’re a person with a high social need, making video calls is an even more effective strategy for maintaining contact. “Things like Skype or Google Hangouts or Facetime can be helpful as well,” says Dattner, “simply because video is a richer medium than speaking on the phone.”

3. Get a Buddy

Whether it’s another friend who works from home or someone who’s genuinely concerned for your mental health, having a friend keep tabs on you can be helpful. Setting goals with this person (for instance: “I want to finish this article today”), and checking in with them over the course of the day can help keep you feel connected, on track, and motivated to work.

4. Get Up

Working from home is all about setting boundaries — it’s too easy to blur the lines between office space and personal space when they’re squished into 500 square feet. There are major concerns about technology invading the bedroom and interrupting a good night’s sleep — and working in bed is a major culprit. Maintain a physical workspace, and don’t let it cross over into your personal space.

5. Get Dressed

It’s important to maintain a mental workspace as well as a physical one. If you’re sitting around all day in your underwear, it could hinder your motivation to be productive — or even just behave like a respectable human being. According to Dattner, “sometimes getting dressed in business attire can make people feel like they’re more connected.” Just because no one will see you doesn’t mean you can go without showering or brushing your teeth. Be better.

6. Get a Plan

Part of the joy of working from home is freedom from the rigid structure of the office day. But when you have too little structure, it’s easy to lose track of time, causing your productivity to suffer. Scheduling in work periods as well as breaks can keep you efficient as well as sane.

7. Get Out

Feeling isolated is one of the most common issues with working from home, according to Dr. Dattner. To fight that feeling of being disconnected, try working at a café, shared office, or other environment where you’ll be surrounded by people. “Even though they’re working independently — in a Starbucks, on WiFi,” says Dattner, “it still makes them feel like they’re not quite as isolated as if they’re just at home.”