You may need a sleep study if you have sleep problems that last longer than a few weeks and aren't because of too little sleep or a side effect of a medicine. Sleep disorders are important to diagnose. Untreated sleep disorders raise your risk for heart failure, high blood pressure, stroke, diabetes, and depression. Talk with your doctor. Be prepared to answer questions about your health history. Try to keep a daily sleep diary for a week or two. Write down the time you go to bed, the time you wake up, and anything that seems to affect your sleep. Then your doctor can refer you to a sleep specialist and recommend a sleep study.