Blue Meanies were the bad guys in a 1960’s Beatles film called Yellow Submarine. But here, I think King is just using the phrase to “personify” really bad headaches. The headaches are aggressive and evil, like the Blue Meanies in the film. “Blue” also implies depression, and that may be part of the meaning here.