Sorry for the LolCat-eez. Personally, I believe that if Cats spoke English, it would be in complete sentences and they'd all sound like Oxford Professors (even the really dumb ones, which would then be hilarious).
That said, the main method of not going crazy at work is having and enforcing boundaries. This always sounds simple. Feel free to read that sentence aloud. Easy to say, right? How do you freaking make other people comply with it?
That's rather the trick, then, isn't it?
Most work environments are sort of precarious places as you are expected to both do as you are told AND take initiative and somehow guess which times are which for the entirety of your employment. How independent your boss or co-workers want you to be is inverse to how much they want you to do something specific for them under certain conditions/time frames. Which is to say, they want to hand you a piece of paper with three sentences and have you drop everything and hand deliver them the Taj Mahal in two days, exactly as they'd envisioned it where you take your own initiative to "make it happen" (get resources, hold meetings to approve the design, etc.) but you hand it off to them to their exact specifications.
This is pretty much true if you have a manager or are a manager, but often gets stickier when you're a manager or project manager because you have resources that other people want to use in this exact way. You know, resources that you've already tasked with doing other stuff (as you can't have them just sitting around and doing nothing). Other stuff you may well be invested in from the last time you got a piece of paper with three sentences.
Step 1: Assert yourself. Who are you in the org? Who are you in relation to your boss and your boss's boss? If you're an individual contributor, what are you responsible for. Is it spelled out somewhere that you can reference/point to/hide behind? If not, why not? If you are a manager or a project manager, what is your current set of goals for this year? Have you got that agreed upon from your boss? If not, why not? These statements--in written form or transcribed by you from verbal conversations, is the basic framework by which you and/or your team will take in new work and, more important, decline/postpone new work as needed. So, get your initial idea of what you're doing written down, and get your boss and (if you can) his boss, to sign off on that. Could be your job description or could be a series of bullet points about what your team does and in what priority order.
Step 2: Never say no. This may seem weird in an article about asserting boundaries, but the truth of the matter is that you are never really the one saying no if you have guidelines about what you are and are not supposed to be working on. As a coder, you can not be co-opted to move boxes on the loading dock; as a back end developer you cannot be demanded to write graphical user interfaces; as a manager, you can be asked to do individual contributor work, but you are allowed to pass that down to a subordinate as it suits that person's capabilities.
What this means, then, is that you are not saying no--the process by which work is managed is the one doing the declining. For example, demanding that the person at the fast food restaurant change your tire makes no sense, and once you can show the person asking you for the equivalent (or asking your team for the equivalent) what you're team's goals and priorities are (and job descriptions as needed), they can't BLAME you for not being a mechanic who can change tires. They have to look to someone else to help them. Simple, real, and no-nonsense.
Note that most of the time, the savvy people of the world will find a way to fit your structure of work intake. So, you are a fast food restaurant...you can't change my tire, but you can FEED THE PERSON I HIRE TO DO SO, right? Well, yes, I suppose we can (to extend a metaphor well beyond the point of logic).
The next step in not saying "no" is saying "Not now."
Step 3: Be helpful. When saying you cannot help someone by doing the work they are requesting, it's a really good idea to point them to the next person on the chain who might be able to help them; in this way they have direction. People without direction who feel they've been told "no" will escalate, even if your group is not the group who can help them. This wastes a ton of time and makes all parties look bad.
Instead, send them to someone who can help them, or let them know "Not now, but sometime" you can be the person. If you know you will be updating them as to your readiness in two weeks' time, you know they won't be foisting new requirements on you for that particular project before two weeks--your time is effectively your own (or belongs to the various people who have already managed to wrangle it).
Step 4: Deal in reality. It's easy to say yes. Very, very easy. It's hard to actually deliver yes. If you have a five pound sack and ten pounds of stuff, only five pounds is going to fit into it, no matter how much the people that want you to do stuff yell at you. Your job, as a manager, is to tell the truth, even (and sometimes especially) when people don't want to hear it. Get your facts in order, know the capacity of yourself and your team, and tell people that they can have all 10 pounds in the sack, just not all at the same time.
This also applies for multiple priority 1 projects/issues/revelations from the muses. Everything can't be a priority 1; when you start to work on it, you'll select something to do first. The choice of the people giving you marching orders is that they can either tell you what's first on your list, or you can pick it yourself, but reality dictates someone does the picking...then suggest it be them. The actual explanation as I wrote it actually seems to work wonders, even with the most dedicated followers to the rule of "everything is really, really important and must be done first."
Finally: Share the responsibility. You report to someone, even as the manager. Even if it's a group of people, talk to them and let them know what you're doing first, second, and third. With agreement from them on your priorities (and a quick run back to your desk to sum up the discussion and get it in writing winging its way to their inboxes), you can do the work you know you can get done in the time you can get it done and if anyone questions, argues, or gets upset, you can send them to the other folks who made the decision with you/gave you permission to do your work in a way that, well, actually works.
Tell tale signs that you need to watch your boundaries (and possibly the boundaries of your team) are working more than eight hours in a day for more than three days in a row (when you normally don't do that), and dreading to come into the office. When you face why these things are happening, then implement some of the ideas above, you'll get some breathing room, and probably find you--and your team--are happier within the walls of your own boundaries.