The essential mineral magnesium has an unexpected role in helping living things remain adapted to the rhythms of night and day, scientists have discovered. Magnesium — a nutrient found in many foods — helps control how cells keep their own form of time to cope with the natural environmental cycle of day and night.