BACKGROUND: The offset analgesia phenomenon refers to the disproportionately large decrease in the perceived pain following a slight decrease in intensity of a noxious heat stimulus. It is considered an expression of the activation of the endogenous pain-modulation system. The main aim of this study was to examine pain processing using the offset analgesia paradigm in subjects with interictal episodic migraine compared to those with non-ictal chronic migraine. Additionally, as secondary outcome measures, we aimed to: (1) explore fluctuations in the endogenous pain modulation system throughout the migraine cycle by including small subgroups of episodic migraine patients in different migraine phases, and (2) compare different subgroups of non-ictal chronic migraine patients with or without medication overuse headache (MOH). METHODS: A total of 68 subjects with episodic migraine (different subjects were evaluated during the interictal, preictal, ictal, or postictal phase), 34 with non-ictal chronic migraine with or without MOH, and 30 healthy controls were enrolled. Participants underwent six trials involving constant temperature and stimulus offset applied to the forehead, with pain responses measured using a continuous analogue-to-digital converter of VAS. RESULTS: The offset analgesia phenomenon was recorded predominantly during the postictal phase among the population of episodic migraine patients, as well as in healthy subjects. Offset analgesia was generally absent in interictal episodic migraine subjects and in subjects with chronic migraine with MOH, though some individual variability was observed. A paradoxical increase in pain facilitation was observed in most preictal and ictal episodic migraine subjects, as well as in chronic migraine subjects without MOH. The severity of offset analgesia impairment correlated with scores on the Allodynia Symptom Checklist and the Numeric Pain Rating Scale, which assessed average headache intensity during untreated migraine attacks. CONCLUSIONS: Episodic and chronic migraine patients exhibit disrupted top-down pain modulation pathways, with more significant alterations in chronic migraine without MOH. Additionally, we provide preliminary evidence that cyclical changes in the endogenous pain modulation system could contribute to migraine recurrence in episodic migraine sufferers. However, given the small subgroups of interictal patients evaluated in different migraine phases and the cross-sectional study design, these findings should be interpreted with caution and confirmed by future longitudinal studies with larger sample sizes.