Low / loss of motivation is associated with several Disorders of Diminished Motivation (DDM) (eg, akinetic mutism, abulia, apathy) that occur frequently in individuals with traumatic brain injury or other underlying neurological disorder, as well as avolition, and is a prominent symptom of dysthymia, motivational anhedonia, schizophrenia, and others.
There is not much research on treatment of motivation in these disorders with nutrition, possibly because of the underlying neurological causes, the complexity of studying nutrition, and low incidence rates. For a reasonably useful answer, I will instead review the effect of nutrition on motivation in depression, where much more research is available, and this would hopefully extend to low motivation in general.
Personalized Nutrition:
There are several reasons why it may be impossible to find clear answers on nutritional treatments for motivation. For one, known nutrient deficiencies rarely manifest in isolated cognitive symptoms such as low motivation - but rather with acute physical disease symptoms.
Another important factor is that nutrient deficiencies may have as much to do with individual characteristics as general dietary ones - that is, a dietary prescription may not work the same for everyone. Unfortunately, nutritional genomics as a field is currently in its infancy - see Ordovas et al (2018) for a recent review.
There are also many unknowns remaining regarding the role of the gut microbiome in depression, and the placebo effect of treatment - ie, seeing a nutritionist may well be as important as the prescription they provide. And ironically, some research suggests that fasting may be effective with depression - implying the opposite of a nutrient deficiency!
Healthy Diet:
Rigidly set dietary prescriptions can have advantages even when not personalized. For example, they take the onus off patients to make healthy diet choices, and may be more likely to be followed.
However, research on a variety of diets demonstrate that healthy diets have positive effects on depression (Molendijk et al, 2018; Opie et al, 2015; Firth et al, 2019). The general recommendation therefore is well known: Reduce sugar and processed foods, increase fruits and vegetables. This has the added bonus of not just improving motivation, but also improving overall physical and mental health!
So, the below recommendations are fine to follow, but just note that any healthy diet is fine too.
Dietary Prescriptions:
Several recent reviews of current findings containing specific dietary prescriptions are listed below, with relevant extracts. I encourage reading the papers for specific tests of nutritional interventions and their results, as recommendations may or may not be applicable.
Sathyanarayana et al (2008): Understanding nutrition, depression and mental illnesses
The dietary intake ... are often deficient in many nutrients,
especially essential vitamins, minerals, and omega-3 fatty acids.
Khanna, Chattu, & Aeri (2019): Nutritional Aspects of Depression in Adolescents - A Systemic Review
... several healthy foods such as olive oil, fish, nuts, legumes,
dairy products, fruits, and vegetables have been inversely associated
with the risk of depression and might also improve symptoms.
WebMD: Depression and Diet
... while certain eating plans or foods may not ease your symptoms or
put you instantly in a better mood, a healthy diet may help as part of
your overall treatment.
Brown (2012): Nutritional Brain Energy Enhancement for Reducing Mental Fatigue and Improving Mood and Cognition
The enhancement of brain energy metabolism with nutritional factors
such as creatine, acetyl-l-carnitine, multivitamins and polyphenol
rich diets may be a novel strategy for reducing mental fatigue
and improving mood and cognition ...