Mother in law/Husband...help!

So, whenever I get mad at my MIL I feel like I take it out on my husband. I'm snappier with him and I don't feel like having sex. I know I shouldn't take it out on him and it's not his fault but I don't know what to do. It don't happen very often less than once or twice a year maybe...but it happened recently. If I'm upset with anyone else I'm fine with him except when I'm upset with his mom.