There is now evidence that melatonin may have a role in the biological regulation of circadian rhythms, sleep, mood, and ageing. Altered melatonin levels in cluster headache and migraine have been documented. Melatonin mechanisms are related to headache pathophysiology in many ways, including its anti-inflammatory effect, toxic free radical scavenging, reduction of proinflammatory cytokine up-regulation, nitric oxide synthase activity and dopamine release inhibition, membrane stabilization, GABA and opioid analgesia potentiation, glutamate neurotoxicity protection, neurovascular regulation, serotonin modulation, and the similarity of chemical structure to that of indomethacin. Treatment of headache disorders with melatonin and other chronobiotic agents is promising. A double-blind, placebo-controlled trial shows melatonin is effective in cluster headache prevention, other studies also show benefit in other disorders. Melatonin plays an important role in headache disorders, offering new avenues for studying their pathophysiology and treatment.