In addition to diet, there are many other things you can also do related to lifestyle, such as stress management through mindfulness (8) or gentle movement such as pre or post natal yoga (9), which have both shown to be incredibly helpful in encouraging mental wellbeing. If you feel you need extra support, personalised nutritional therapy can be very helpful as there can often be other drivers such as nutrient deficiencies and digestive complaints that can play a significant role in mental health and will need to be addressed in a way that is tailored to the individual. 
Barbara Sahakian, a neuroscientist at Cambridge University, doesn’t dismiss the possibility of nootropics to enhance cognitive function in healthy people. She would like to see society think about what might be considered acceptable use and where it draws the line – for example, young people whose brains are still developing. But she also points out a big problem: long-term safety studies in healthy people have never been done. Most efficacy studies have only been short-term. “Proving safety and efficacy is needed,” she says.
But before you dismiss the diet-brain connection as mere conjecture, keep in mind that study after study has found a relationship between what we put in our mouths and how well we can perform important thinking and memory tasks. While certain nutrients may specifically assist brain function, there is also the totality of our diets to consider. One recent U.K. study found that a diet high in saturated fat actually caused damage to neurons that control energy and appetite in mice. And several well-regarded studies have shown that meal timing is an important predictor of performance. For example, research shows that eating breakfast can improve the memory and acquisition skills of schoolchildren.
Cacao contains powerful flavonols, compounds that act as antioxidants and help preserve the brain’s stem cells. “Stem cells produce new brain cells,” says Dennis Steindler, PhD, director of the Neuroscience and Aging Lab at the Jean Mayer USDA Human Nutrition Research Center on Aging at Tufts University, “and chronic inflammation or the beginnings of disease can damage these reparative cells and the other at-risk brain cells used for standard operating procedures, like memory and thinking.” Flavonols have also been shown to support the hippocampus, a part of the brain involved in memory and mood, notes Steindler. Stick to a square or two of dark chocolate daily.
That study is also interesting for finding benefits to chronic piracetam+choline supplementation in the mice, which seems connected to a Russian study which reportedly found that piracetam (among other more obscure nootropics) increased secretion of BDNF in mice. See also Drug heuristics on a study involving choline supplementation in pregnant rats.↩

Modafinil is a stimulant specifically designed to reduce fatigue and sleepiness. It was approved for treatment of narcolepsy in 1998, and although the exact mechanism behind its effects is not fully understood, most research indicates that modafinil also works by inhibiting reuptake of dopamine, which produces effects similar to those of methylphenidate. It’s also believed that by inhibiting dopamine uptake, more acetylcholine (another neurotransmitter) is released by the hippocampus, which leads to improved cognitive performance, specifically memory.
The main concern with pharmaceutical drugs is adverse effects, which also apply to nootropics with undefined effects. Long-term safety evidence is typically unavailable for nootropics.[13] Racetams — piracetam and other compounds that are structurally related to piracetam — have few serious adverse effects and low toxicity, but there is little evidence that they enhance cognition in people having no cognitive impairments.[19]