You could try a ritual to calm your mind. I don't know what works for you but if my mind is thinking too hard I also cannot sleep. What I do is read a book a little bit or eat something to make my body do something else like digesting. I know it is not the best thing but you will find something that works for you. Meditating is also working :)
Reading a book is a good thing. I should have tried ;)