I have wondered about that. Some jobs I think make you die from within even if they are only 9to5. One buddy of mine had a govt job and complained about it everyday… it made him toxic. He eventually left but took waaaay to long.
trick is to bounce around departments until you get into a good group of non-toxic folks, and your skill level is above everyone. 2 hours of work is the equivalent of 2-5 days of another programmers work, and everyone loves your output.
If you're working from home, its really not that bad, since the other 6 hours of teh day you can learn anything you want. Just have to be near computer incase something happens etc...
I can honesty LY tell you moving from private industry to state government was the best decision I have made. Definitely move around until you find people and a department that you like.