Dietary therapies are routinely recommended to reduce disease risk; however, there is concern they may adversely affect mood. We compared the effect on mood of a low-sodium, high-potassium diet (LNAHK) and a high-calcium diet (HC) with a moderate-sodium, high-potassium, high-calcium Dietary Approaches to Stop Hypertension (DASH)-type diet (OD). We also assessed the relationship between dietary electrolytes and cortisol, a stress hormone and marker of hypothalamic–pituitary–adrenal (HPA) axis activity. In a crossover design, subjects were randomized to two diets for 4 weeks, the OD and either LNAHK or HC, each preceded by a 2-week control diet (CD). Dietary compliance was assessed by 24 h urine collections. Mood was measured weekly by the Profile of Mood States (POMS). Saliva samples were collected to measure cortisol. The change in mood between the preceding CD and the test diet (LNAHK or HC) was compared with the change between the CD and OD. Of the thirty-eight women and fifty-six men (mean age 56·3 (sem 9·8) years) that completed the OD, forty-three completed the LNAHK and forty-eight the HC. There was a greater improvement in depression, tension, vigour and the POMS global score for the LNAHK diet compared to OD (P < 0·05). Higher cortisol levels were weakly associated with greater vigour, lower fatigue, and higher levels of urinary potassium and magnesium (r 0·1–0·2, P < 0·05 for all). In conclusion, a LNAHK diet appeared to have a positive effect on overall mood.