sleep hygiene
n. Principles or practices that enable a person to consistently get a good night's sleep.
Just as small children need a bedtime routine, grownups can benefit from familiar night-time rituals. A warm bath, a soothing drink, listening to music or having a good conversation with your partner or a friend on the phone (as long as it's not about the day job) are all recommended. Known as "sleep hygiene", this also means avoiding napping too much during the day.
—Sally O'Reilly, “How tired at work?,” The Evening Standard, January 21, 2002
1979 (earliest)
But everyone, the doctors say, should practice "sleep hygiene" by trying to following a regular schedule for going to bed and arising and always leaving time for the amount of sleep they need. One of the worst things to do is go to bed feeling anxious, worried or angry. It's wise to set aside an hour of relaxation before bedtime, such as reading in bed until falling asleep.
—Timothy Harper, “American Style: On Treating Sleep Disorders,” The Associated Press, December 14, 1979