Diet significantly influences sleep quality. Consuming a balanced diet rich in fruits, vegetables, whole grains, and lean proteins can promote better sleep. Certain nutrients like magnesium and tryptophan have been shown to aid sleep. It's also advisable to avoid stimulants like caffeine and sugar close to bedtime.