Opiates can cause head aches, though usually they occur during, or a few hours after the opiate has effect. If you're having chronic headaches all week, I would attribute that to something else. If you were talking benzo's, then it would be a different story, as benzo withdrawal causes horrible migraines.