Background: A short ketogenic diet (KD) treatment can prevent migraine attacks and correct excessive cortical response. Here, we aim to prove if the KD-related changes of cortical excitability are primarily due to cerebral cortex activity or are modulated by the brainstem.Methods: Through the stimulation of the right supraorbital division of the trigeminal nerve, we concurrently interictally recorded the nociceptive blink reflex (nBR) and the pain-related evoked potentials (PREP) in 18 migraineurs patients without aura before and after 1-month on KD, while in metabolic ketosis. nBR and PREP reflect distinct brain structures activation: the brainstem and the cerebral cortex respectively. We estimated nBR R2 component area-under-the-curve as well as PREP amplitude habituation as the slope pof the linear regression between the 1st and the 2nd block of 5 averaged responses.Results: Following 1-month on KD, the mean number of attacks and headache duration reduced significantly. Moreover, KD significantly normalized the interictal PREP habituation (pre: + 1.8, post: - 9.1, p = 0.012), while nBR deficit of habituation did not change.Conclusions: The positive clinical effects we observed in a population of migraineurs by a 1-month KD treatment coexists with a normalization at the cortical level, not in the brainstem, of the typical interictal deficit of habituation. These findings suggest that the cerebral cortex may be the primary site of KD-related modulation.Trial Registration: ClinicalTrials.gov NCT03775252 (retrospectively registered, December 09, 2018).