The invention relates to a compound for use in a method of treatment or prevention of migraine and/or symptoms thereof. The compound is selected from beta-hydroxybutyric acid (βHB) or a pharmaceutically acceptable salt thereof, acetoacetate (AcAc) or a pharmaceutically acceptable salt thereof, a metabolic precursor of βHB or AcAc 1,3-butanediol and a compound comprising an acetoacetyl- or 3-hydroxybutyrate moiety. The invention further relates to a pharmaceutical composition comprising βHB, AcAc or a pharmaceutically acceptable salt thereof.