Jane
We unfortunately have this problem and it hits sleeping and it hits before waking in the morning and we simply have to get out of bed immediately to get the mind onto something else.
Partly it is anxiety and partly ocd and developed from depression. It has taken a long time to be able to handle it and still medication is needed with extra medication from time to time.
I hope you are able to get a hold of it and not it you, because it really makes you feel as if you're going mad. Read a book, watch a movie, bake a cake anything but leave your mind free. Then again there is always therapy,
Wishing you luck
Bridie