You may have high cortisol. Cortisol is produced by the adrenal glands, as is melatonin. What you might do is try using supplements called adaptogens. At bedtime take 2 gms of melatonin. I also take ashwagandha which normalizes cortisol.
I know about the above because I suffer from it. I am also deficient in iodine (also causing insomnia). I take a supplemental dose of iodine, using Lugol's solution. A small dose of three drops of 5% per week is a big help. (I take one drop on Monday, Wednesday, and Friday)..
Insomniacs are not hyprcrondriacs.
Also, panic attacks can be caused by an adrenal malfunction. This also happened to me.
Hello and hope you are doing well.
You should not keep thinking about sleeplessness, as this in turn promotes insomnia and it becomes a vicious cycle. You should stop becoming anxious and try to relax. Try to have a warm bath before sleeping. Have a glass of milk or read a book before trying to sleep. Don’t watch TV or do exercise before sleeping. Condition yourself that you can relax and that you can sleep well. Try yoga and meditation they have calming effects. Go for long stress free walks. Also, do exercise in the daytime this promotes good sleep.
Hope this helped and do keep us posted.