Hi. Overthinking is something we all do but when we start dwelling too much in the past or future, we forget to live, that is the present.
Sleep problem is a result of over thinking and generally, we are alone with our own thoughts, we tend to drift away into hypothetical scenarios.
Next Steps
I would suggest you to read on MINDFULNESS; it is something that helped a lot of my clients who had this issue. See a therapist with this background or someone who is proficient in Cognitive therapy.
Health Tips
There are a lot of self-help books available on mindfulness, over thinking but they can only help if you are motivated to change. If you feel you cannot do this alone, I would suggest you to see a counselor or a psychologist.