Studies dating all the way back to the 1920s have found evidence to suggest that a ketogenic diet may help to prevent migraines.