Lack of sleep has been linked with mainly two types of headaches including migraine headache and tension headache. Here are a few things you can do to manage your headaches and sleep at home such as reduce your stress levels through exercise, relaxation techniques, or therapy. Apply a hot or cold compress to your head for 5 to 10 minutes at a time. This can help ease the pain. You can even try acupuncture or massage.