Seniors who consumed around 150g of cooked mushrooms weekly performed better on neuropsychological tests and had a 50% reduced risk of mild cognitive impairment compared to age-matched healthy controls.
This study was not a clinical trial so it is hard to establish causation but the researchers did see a dose-dependent effect with 75g of cooked mushrooms weekly also decreasing the risk of mild cognitive impairment.
One potential compound in mushrooms that may have brain benefits is ergothioneine. It is a unique antioxidant and anti-inflammatory compound that also accumulates in mitochondria. Humans are unable to synthesize ergothioneine on their own but it is present in a variety of mushrooms.