A pillow might give you a headache if it’s the wrong thickness or firmness for you. The wrong pillow can throw your neck out of alignment, causing stiffness and pain leading to a headache. Use a pillow suited for your sleeping position and size to prevent headaches.