Hi, June! Nortriptylene (Pamelor) is a tricylic antidepressant. Are you taking any other antidepressants? As you probably know, they are sometimes used for sleep and also for pain. One of the possible side effects of this drug is headaches.
My PMD recently suggested an OTC med for me for sleep: Melatonin. It is actually a hormone that the body makes itself, but as one gets older the amount of that hormone decreases. It works like magic. I started with 3 mg tablets, one about an hour before bedtime. However, after 2 wks. I started having nightmares, so decreased it by half...to 1 1/2 mg. That is working just fine. So you might want to alert your doc to the headaches and ask about the Melatonin. It comes in 1 mg, 3 mg, and 5 mg strengths.
Hope this helps!