With increasing prevalence of heart failure (HF) owing to the ageing population, identification of modifiable risk factors is important. In a mouse model, chronic hypohydration induced by lifelong water restriction promotes cardiac fibrosis. Hypohydration elevates serum sodium. Here, we evaluate the association of serum sodium at middle age as a measure of hydration habits with risk to develop HF. We analysed data from Atherosclerosis Risk in Communities study with middle age enrolment (45-66 years) and 25 years of follow-up. Participants without water balance dysregulation were selected: serum sodium within normal range (135-146 mmol/L), not diabetic, not obese and free of HF at baseline (N = 11 814). In time-to-event analysis, HF risk was increased by 39% if middle age serum sodium exceeded 143 mmol/L corresponding to 1% body weight water deficit [hazard ratio 1.39, 95% confidence interval (CI) 1.14-1.70]. In a retrospective case-control analysis performed on 70- to 90-year-old attendees of Visit 5 (N = 4961), serum sodium of 142.5-143 mmol/L was associated with 62% increase in odds of left ventricular hypertrophy (LVH) diagnosis [odds ratio (OR) 1.62, 95% CI 1.03-2.55]. Serum sodium above 143 mmol/L was associated with 107% increase in odds of LVH (OR 2.07, 95% CI 1.30-3.28) and 54% increase in odds of HF (OR 1.54, 95% CI 1.06-2.23). As a result, prevalence of HF and LVH was increased among 70- to 90-year-old participants with higher middle age serum sodium. Middle age serum sodium above 142 mmol is a risk factor for LVH and HF. Maintaining good hydration throughout life may slow down decline in cardiac function and decrease prevalence of HF.