This is the conclusion from the link BB posted:
Conclusions Despite the inherent limitations of the observational data based on self-reports posted online, the association strength and reports of sustained benefit support a hypothesis of a ketogenic diet being associated with beneficial effects on mood stabilisation. Caution should be exercised in interpreting this data until a controlled trial can be carried out to examine this hypothesis. These preliminary observations are generally consistent with a mitochondrial dysfunction component to bipolar disorder aetiology with ketones bypassing a block between glycolysis and the tricarboxylic acid cycle. Declaration of interest None.
While I am happy with their call to further investigate, and their speculation about ketones bypassing a block, there are many other possible explanations, from improved nutrition to (as mentioned above) the reduction or elimination of food types that may be contributing to the problem.
Will look forward to further research on the subject.