Tell your doctor about your sleeping problems. Try to keep a daily sleep diary for a couple of weeks. Write down the time you go to bed and the time you wake up. Also write down how you feel during the day and anything that seems to affect your sleep. If you drink caffeine or alcohol, note when you drink and how much you drink. Include any medicines you use, including over-the-counter medicines and herbs. Your doctor can review your diary and work with you to create a treatment plan. You may need to learn good sleeping habits. You may also need to make some lifestyle changes. Any health problems you have may need to be treated first.