A published in the journal of Research in Medical Science indicated that senior individuals who took a supplement improved their symptoms of insomnia and their sleep quality. Magnesium was the prominent nutrient in the study. Magnesium can be found in a variety of foods, including nuts, beans, seeds, tofu, bananas, and whole grains.