Asking about the affect of fasting on intelligence would be similar to asking about the potential boost of neurogenesis and neurocognition involved in calorie restriction, exercise, keto diet, MCT intake, etc. According to diverse research, such interventions can variously increase BDNF, ketone levels, autophagy, adult stem cell release, mitochondrial functioning, etc; while variously decreasing excessive mTOR, inflammation, reactive oxygen species, neurotoxic excitatory response of neurons, apoptosis, etc; all of which is essential for brain health. That is just what I can think of offhand, after spending the past week looking through the research literature (far too much to be cited here). But none of that, so far, can prove a strong conclusion about measurable increase of intelligence.
Also, keep in mind that too much fasting and calorie restriction without periods of well-fed nutrition, too much protein restriction on the keto diet, too much exercise without recovery time, and such can, instead, have an adverse affect on health, including of the brain; and certainly it can sometimes be problematic for in utero development, as seen in the mixed results of fasting research 1. Unfortunately, nutrition studies is in the middle of a replication crisis. Much of the research is limited and confounded, and the results are mixed. We don't know all of the conditions and mechanisms, though it's becoming more clear, about how to optimize such interventions to get the potential benefits without any of the potential harms. But keep in mind that some of the problems are mainly seen in animal studies. And rodents, for example, don't enter ketosis as easily or as highly as humans. Still, there is plenty of scientific evidence that clarifies.
To focus on a particular factor, one of the most basic aspects of fasting is autophagy. One increases autophagy anytime one doesn't eat for a period, such as while sleeping, or with various hormetic stressors such as fasting, exercise, cold exposure, etc 3. Even the autophagic benefits from calorie restriction only occur when it involves fasting but benefits disappear when calories are spread out in multiple meals. Autophagy simply clears out aging, injured, and dysfunctional cells, including neurons; and allows stem cells to replace them 4. In studies where the capacity for autophagy is eliminated, rodents age and die prematurely with advanced neurodegeneration. Autophagy alone won't necessarily increase intelligence, but it would improve the likelihood that normal neurocognition is developed and maintained or that damage is healed and stunting reversed. It's also essential for certain cognitive abilities such as memory formation 5. It would be hard to increase intelligence without increasing memory capacity.
More useful might be the research on ketosis. Many practices, besides diet and ketone supplementation, can induce higher levels of ketones. Fasting is one such ketogenic intervention, but the research literature sometimes describes the ketogenic diet as fasting mimic. There is more than a century of research on the ketogenic diet, and so it might clarify this one aspect of fasting. But like with fasting, the ketogenic diet has shown varying results in its affect on cognition and intelligence. Generally, inducing ketosis has been beneficial for wide variety of neurological conditions: epilepsy, Alzheimer's, mood disorders, concussions, etc. In clinical trials of the Bredesen Protocol, there was implemented a keto diet and intermittent fasting, combined with other measures. It was able to reverse the neurocognitive decline of advanced Alzheimer's; the only intervention so far that has accomplished this. Dr. Dale Bredesen, though, wasn't specifically testing for changes in intelligence. But obviously, anything capable of reversing neurocognitive decline would affect intelligence measures.
Along with its use in severe neurological disorders, ketosis and ketones have been repeatedly proven as one of the main factors in optimal brain development, functioning, and health; including the increase of brain growth (neurogenesis) 6 and hence brain volume 7, along with increasing brain oxygen levels 8 and not only increasing ketone uptake but also insulin sensitivity (more effective use of glucose) 9 and is glucose-sparing 10, and to boot it improves mitochondrial function that produces the body’s endogenous fuel ATP 11. There are many causal mechanisms involved that we now scientifically understand (as described in the various cited references), but it’s not clear which ones are the most important. Though the diet is named after ketosis, that can only partly explain why its so powerfully and diversely effective, as research shows additional benefits than seen in ketone supplementation alone.
How could all of this, particularly the potential for ketosis-related neurogenesis in early childhood development, not be related to increased development of intelligence and higher measurements of IQ, if all other things were equal (quality education, access to learning materials, non-toxic air and water, etc)? In that context, the keto diet, like non-nutritional ketosis and exogenous ketones, has been shown to improve such things as expressive language and articulation, alertness and attention (vigilance, concentration, focus), visuomotor precision and sensorimotor speed, learning (word comprehension) and memory (short-term/working, reference, episodic, spatial, verbal), executive function and processing speed, and total or global cognitive function 131517192123252729313335. Increasing these would reduce some of the immediate constraints on the effective performance of both crystallized and fluid intelligence; in terms of reading comprehension, information analysis, answering questions, articulating those answers, pattern recognition, solving problems, and other areas of critical thinking and higher thought.
Fortunately, at least with the ketogenic diet, we aren’t limited to only making inferences about potential measurable IQ differences based on present scientific research, since some research has been done directly measuring intelligence, if evidence remains limited: “A number of studies used neuropsychological tests but did not perform statistical analysis to assess the cognitive effects of KD [ketogenic diet]. It is difficult to interpret these results as it is unknown which criteria the authors used to conclude when a change in outcome was a true cognitive improvement. Caraballo and colleagues used objective tests to investigate improvements in global cognition and reported improvements in all four of their patients. Six patients were studied by Ito and colleagues. A slight increase in intelligence quotient (IQ), determined by objective tests, was reported in all patients. Two studies reported that 44% (34 patients) and 33% (42 patients) showed improvements in cognitive development. Ramm-Pettersen and colleagues used objective tests to evaluate improvements in learning, memory, and language in six patients. They reported learning and memory improvements in 66% of the patients and language in 86% of the same patients.” 37
Then consider some case studies: “In a case study of a child with autism and epilepsy, following standard treatment non-response, the individual was placed on KD (1.5:1 lipid:non-lipid ratio) with adjunct anticonvulsant therapy (51). The patient was in ketosis. After initiation of the diet several benefits ensued including the resolution of morbid obesity and the improvement of cognitive and behavioral features of the disorder. After several years on the diet, the patient’s score on the Childhood Autism Rating Scale decreased from 49 to 17, a change from a rating of severe autism to non-autistic, and IQ increased by 70 points. Fourteen months following the initiation of the diet the patient was also seizure free.” 38 And: “The two case reports by Herbert et al. and Żarnowska et al. reported improvement in cognitive function. In the latter case, the cognitive function improvement was quantified through a standardized scale, the Wechsler intelligence scale (WISC-R): full-scale IQ increased from 82 to 99, verbal scale IQ increased from 102 to 113, and performance scale IQ increased from 62 to 83.” 39
Considering all of the evidence (partly covered here), including the larger ketosis research as a proxy, one can surmise the probability that fasting, as part of a healthy diet and lifestyle, would improve measurable intelligence. After having written all the above, I decided to be even more thorough in looking through the research literature about fasting, but I still couldn't find much that was directly relevant, either in terms of intelligence or long-term cognitive changes. Many short duration studies showed a negative affect. I wonder if there might be a confounding factor of metabolic disorder and lack of fat adaptation, both being common in most modern industrial populations. If one isn't able to easily switch to fat-burning and ketone production, then fasting would not show immediate beneficial results. For a useful overview, there is an Inverse article that covers some of the research on fasting and the brain. 40 Also, there are a couple of related scientific papers on hormesis and overconsumption. 41 I'll end with the conclusion that I assumed would be the case. There is plenty of supporting evidence, but nothing that can prove a causal link.