Good sleep habits, also called sleep hygiene, can help you get a good night's sleep and beat insomnia. Here are some tips:
Try to go to sleep at the same time each night and get up at the same time each morning. Try not to take naps during the day, because naps may make you less sleepy at night.
Avoid prolonged use of phones or reading devices ("e-books") that give off light before bed. This can make it harder to fall asleep.
Avoid caffeine, nicotine, and alcohol late in the day. Caffeine and nicotine are stimulants and can keep you from falling asleep. Alcohol can cause waking in the night and interferes with sleep quality.
Get regular exercise. Try not to exercise close to bedtime, because it may stimulate you and make it hard to fall asleep. Experts suggest not exercising for at least three to four hours before the time you go to sleep.
Don't eat a heavy meal late in the day. A light snack before bedtime, however, may help you sleep.
Make your bedroom comfortable. Be sure that it is dark, quiet, and not too warm or too cold. If light is a problem, try a sleeping mask. If noise is a problem, try earplugs, a fan, or a "white noise" machine to cover up the sounds.
Follow a routine to help you relax before sleep. Read a book, listen to music, or take a bath.
Avoid using your bed for anything other than sleep or sex.
If you can't fall asleep and don't feel drowsy, get up and read or do something that is not overly stimulating until you feel sleepy.
If you find yourself lying awake worrying about things, try making a to-do list before you go to bed. This may help you to not focus on those worries overnight.