It is tough not getting adequate sleep while being tired. This makes coping difficult. Bpcyclist and Wander have some great suggestions, including seeing your psychiatrist.
You may also be interested in tips for coping with insomnia including relaxation given by HelpGuide.org (
Insomnia - HelpGuide.org).
For me, I lay down and
I don't try to sleep when I have racing thoughts. If I try to sleep but can't it winds me up more.
I try to rest by laying still with no expectation of falling asleep. I try to slow down my mind with slow belly breathing and a mantra such "Calm" with inhales and "Down" with exhales. You might try combinations that work for for you. Rest is not as good as sleep, but it is better than no rest at all and trying to get through the next day.
If I am tossing and turning with racing mind, I also sometimes get out of bed or at least sit up in bed and try to relax or hand-write journal what is going on (see HelpGuide). Using electronics at night can be stimulating, and I find journalling by handwriting is more expressive in venting racing thoughts for me than doing it on an electronic device. Sometimes when I got up because I couldn't sleep, I have also slowly rocked in a rocking chair at about 2 cycles in 5 seconds until I feel like I could lay down and rest. If I rock too fast, it amps me up, but slow rocking helps.
Best wishes!