Following a Mediterranean diet with greater adherence was linked to the lowest risk of cognitive impairment. High fish and vegetable consumption appeared to have the greatest protective effect against cognitive decline.