context: Can't get to sleep at night? Can't stay asleep? Insomnia is a sleep disorder that prevents people from falling and/or staying asleep. People with insomnia have one or more of these symptoms: Difficulty falling asleep Waking up during the night and having trouble going back to sleep Waking up too early in the morning Feeling tired when you wake up Being sleepy or tired during the day Feeling cranky or irritable Problems with focus or memory Primary insomnia is not directly linked to any other health condition or problem. Secondary insomnia comes from something else, like a health condition (such as asthma, depression, arthritis, cancer, or heartburn), pain, a medication, or a substance like alcohol. Insomnia can be short-term (acute), or it can last a long time (chronic). It can also come and go, with periods of time when a person sleeps fine. Acute insomnia can last up to 3 months and often has a cause like stress. Insomnia is chronic when a person has sleep trouble at least 3 nights a week for a month or longer. Insomnia can last for years if you don't treat the cause. Causes of acute insomnia can include: Major life stress (job loss or change, death of a loved one, divorce, moving) Illness Emotional or physical discomfort Noise, light, or being too hot or too cold while you're trying to sleep Some medications (including certain ones for colds, allergies, depression, high blood pressure, and asthma) Changes to a normal sleep schedule (like jet lag or switching from a day shift to night shift, for example) Causes of chronic insomnia include: Irregular sleep schedules Substances that interfere with sleep (alcohol, caffeine, nicotine) Activities that stimulate the brain (playing video games, watching TV) right before bedtime For some people, exercising too close to bed time Using the bedroom for activities other than sleep and sex Depression or anxiety Chronic stress Pain or discomfort at night Poor sleep habits If you think you have insomnia, talk to your doctor or health care provider. A checkup may include a physical exam and questions about your health and sleep problems. You may be asked to keep a sleep diary for a week or 2, where you keep track of your sleep patterns and how you feel during the day. Your health care provider may want to talk to your bed partner, too, about the amount and quality of your sleep. In some cases, you may be referred to a sleep center for special tests. You may not even need any treatment for acute insomnia. In mild cases, it often can be cured with good sleep habits (see below). If your insomnia makes it hard for you to function during the day because you are tired, your doctor may prescribe sleeping pills for a limited time. These quick-working, short-acting drugs can help you avoid next-day drowsiness. There is not a lot of evidence that over-the-counter sleeping pills are effective for insomnia. They may have troubling side effects including daytime drowsiness.. Good sleep habits, also called sleep hygiene, can help you get a good night's sleep and beat insomnia. Try these: Go to sleep about the same time each night. 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 caffeine, nicotine, and alcohol late in the day. Caffeine and nicotine are stimulants and can keep you from nodding off. Alcohol can cause waking in the night and leads to poor sleep. Get regular exercise. You'll feel more tired at night. However, you may not want to exercise within about 3 or 4 hours of bedtime. Doing so keeps some people from falling asleep. Don't eat a heavy meal late in the day. Eat dinner at least 2 hours before bedtime. 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 outside sounds. Follow a routine to help you relax before sleep. For example, 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. Read or do something quiet 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 take away worries overnight.