I do sometimes knit at work, and I never have to worry about getting in trouble with my boss . . . because I'm self employed!
It's not always possible, though. My job is transcribing state hearings, so most of the time my hands are too busy typing to knit. The "good" news is that once I've finished typing my hearings I need to proofread, which means going back and listening to them again while re-reading what I've typed. That's when I can manage to squeeze some knitting in, as long as it's nothing too complicated.
It does slow down my proofreading a little bit, but I'll often do it unless I'm running behind schedule. It makes the tedious proofreading process much more enjoyable.