Diet has long been the focus of attention as a leading risk factor for non-communicable diseases. As such, a better understanding of it is crucial to establish priorities for dietary guidelines and to inform, design, and implement strategies for preventing, helping manage, and stopping the progression of sleep and mental health-related symptoms/disorders. The aim of the current study is to conduct the largest investigation of diet, sleep, and mental health to date by utilizing the UK Biobank (UKB) dataset to identify the associations between diet and (i) sleep quality/health, and (ii) mental health symptomatology. This cross-sectional population-based study involved 502,494 middle-aged adults. UKB food frequency, sleep, and psychological factors and mental health questionnaires at baseline were used. Scores were also calculated for healthy diet, healthy sleep, mental health symptomatology, partial fibre intake, and milk intake. We observed positive associations with healthy diet and sleep and mental health, especially benefits of high intakes of vegetable, fruit, fish, water, and fibre. However, processed meat and milk intake were adversely associated with sleep and mental health. These findings make clear that there are health and wellbeing benefits and drawbacks of different diets, but do not, at this stage, demonstrate the clear causal relationships, which would support dietary interventions that might play a role in the treatment and also self-management of sleep and mental health disorders/symptoms. Further research is required to understand mechanisms of actions of which diet acts on to modulate sleep and mental health, while taking comorbidity of sleep and mental health disorders/symptoms into consideration.