context: If you have insomnia, you may have trouble falling asleep, staying asleep, waking too early, or getting good quality sleep that leaves you feeling rested. You don't feel refreshed when you wake up. During the day, you're sleepy and tired and have trouble functioning. Over 25% of Americans don't get enough sleep from time to time, but almost 10% have chronic insomnia. Insomnia can be acute, meaning short-term. Or it can come in a long-lasting, chronic form. When insomnia comes at least 3 nights a week for 3 months or longer, doctors consider it chronic. Insomnia can also come and go, with periods when you have no sleep problems. Two kinds of insomnia exist: Primary insomnia: Sleep problems are not directly connected with any other health problem. Instead, they are triggered by major stress, emotional upset, travel, and work schedules. But even after such causes go away, the insomnia may persist. You can also develop primary insomnia because of certain habits, such as taking naps or worrying about sleep. Secondary insomnia: Sleep problems occur because of another issue, such as a sleep disorder like apnea; another health condition or disease; chronic pain from arthritis or headaches; medications; or alcohol, caffeine, and other substances. Many factors can cause acute or chronic insomnia: Stress (including job change or loss, moving, death of a loved one) Medical condition or disease (including depression, anxiety, post-traumatic stress disorder, asthma, cancer, heartburn, heart failure, overactive thyroid, Alzheimer's and Parkinson's disease, and other health problems) Pain or physical discomfort Medications Noise, light or extreme temperatures Interference with one's regular sleep schedule (including jet lag or switching work shifts) Substance abuse If you have insomnia, you may have some of these symptoms: Difficulty falling asleep Difficulty staying asleep Waking up too early Feeling tired and irritable Daytime sleepiness Mood changes Lack of motivation Attention, concentration, or memory problems Making errors at work, school, or while driving Tension headaches or stomach aches Frustration or worry about sleep To diagnose insomnia, your doctor will ask about your sleep patterns and habits, stress levels, medical history, level of physical activity, and use of medications, alcohol, caffeine, tobacco, and illegal substances. He or she might also ask you to keep a detailed log of your sleep habits, including sleep and wake times, napping, and any specific problems with sleeping. Your doctor will also do a physical exam to look for health disorders that can cause insomnia. Obesity, for example, may cause sleep apnea. If your insomnia persists even after treatment, your doctor may refer you to a sleep disorders specialist for an evaluation. If the specialist suspects a disorder, such as sleep apnea or restless legs syndrome, you may need to do an overnight sleep study at home or at a special sleep center. If you have short-term insomnia, you may not need treatment. Often, good sleep habits and self-care can cure a mild case. Here are a few suggestions for getting a good night's sleep: Avoid naps during the day. Don't hang out in bed; reserve it for sleep. Go to bed at the same time every night. Exercise. If you still have trouble functioning during the day because of poor sleep, your doctor may prescribe sleeping pills for a few weeks. Commonly used sleep aids include sedatives, minor tranquilizers, and anti-anxiety drugs. Most are safe if a doctor supervises their use. Some sleep aids can become habit-forming or pose the potential for overdose if not used as directed. Some newer sleep aids can be taken for longer periods without losing effectiveness. If you use an over-the-counter sleep aid, take it exactly as directed. An OTC product may help with an occasional sleepless night, but it is inappropriate for chronic insomnia. Chronic insomnia could be a sign of a serious, underlying disorder, so see your doctor. If you decide to try an OTC sleep aid, keep in mind that these products often contain antihistamines, which can cause nervousness, agitation, falls, confusion, urinary difficulties, and daytime sleepiness, especially in older people. If you have chronic insomnia, getting treatment for any underlying health condition or other problem may help you to sleep better. If you still have insomnia, your doctor may suggest behavioral therapy, which is frequently used when insomnia stems from the mind or body being unable to relax. Behavioral therapy teaches a person how to alter behaviors that worsen insomnia and learn new ways to promote sleep. Try not to worry about sleep when you go to bed. Avoid clock-watching. Turn your clock around and use only the alarm. Make your bedroom comfortable for sleep. Keep it dark, quiet, and not too cold or warm. Use a sleeping mask to block light or use earplugs or a fan to block noise. Relax before bedtime by reading, listening to relaxing music, bathing, or doing another relaxing activity. Don't eat a heavy meal late in the day; a light snack before bedtime may help with sleep, though. If you can't sleep and don't feel drowsy, avoid lying in bed. Get up and read or do something that's not stimulating until you feel sleepy. If you've made lifestyle changes and still have sleep problems, write down in a journal: Time you went to bed Approximate time you fell asleep Time you woke up Number of times you woke up during the night Amount of time you stayed awake during the night Total amount of sleep you log per night Any grogginess upon waking in the morning or during the day Naps and their duration Any daytime incidents of dozing off and where it happened Any comments about particular sleep problems or quality of sleep Share your sleep diary with your doctor. Together, you and your doctor will try to address and treat your sleep problem or any underlying cause.