Ibn Qayyim in "Medicine of the Prophet" identified many causes of headaches. These include:

  1. When one of the four essential conditions (coldness, hotness, dryness and wetness) becomes predominant
  2. Ulcers of the stomach because the cephalic (relating to the head) nerves and the stomach are connected
  3. Thick flatulence might accumulate in the stomach then later ascend to the head
  4. A tumour in the gastric veins that cause pain in the head, because the stomach and the head are connected
  5. When the stomach is full of food if some of the food remains undigested
  6. After sexual intercourse because the body will then be weakened and thus exposed to the heat of the air
  7. After vomiting due to excessive dryness, or to accumulating flatulence that ascends to the head from the stomach
  8. Hot weather
  9. Hot air
  10. Cold weather and from the vapor that accumulates in the head and which is unable to decompose
  11. Lack of sleep
  12. Pressure exerted on the head such as when one carries a heavy object on his head.
  13. Excessive talking sometimes weakens the mind
  14. Excessive movements and sports activity
  15. Sadness, depression, obsession and evil thoughts
  16. Excessive hunger because flatulence accumulates in the stomach and ascends to the brain
  17. A tumour in the cerebral lining sometimes feel as if hammers are constantly pounding in the head
  18. A fever, because of the intense heat that the body suffers as a result