Cosmopolitan: The official answer to "Does caffeine help with migraines and headaches?" Small doses of caffeine, such as those in common painkillers, can help relieve headache pain. However, caffeine consumption has also been shown to be a risk factor for chronic headaches and migraines.