Certain drugs can contribute to headaches. These include prescription and nonprescription drugs, recreational drugs, and alcohol. If you use any of these substances, tell your doctor.
Over-the-counter and prescription medications. Over-the-counter pain medications and some prescription drugs may cause frequent headaches - especially if they are overused. Drugs such as ibuprofen , acetaminophen, and aspirin are overused if taken daily to relieve headache pain. Prescription drugs that contain ergotamine or opioids are overused if you take them more than twice a week. Caffeine is another drug that is often overused. Beverages with caffeine, such as coffee and tea, can relieve headaches. However, if you use them too often, they can lead to rebound headaches.
Recreational drugs and alcohol. People can get headaches after stopping or cutting back on their use of illegal drugs and alcohol. This is especially true if the person developed a dependence on the drug or alcohol. If that is the case, headaches may be one of many symptoms associated with withdrawal from the substance after either short- or long-term use.