Sometimes my mind continues racing at the end of the day and that wrecks my sleep. I started a routine where I write down what's bugging me, then I put it to bed, so that I can go to bed peacefully. That trick works for me.
How often do you exercise? Regularly doing so can improve sleep quality. However, avoid doing this immediately before bedtime, as it can have a stimulant effect on the body. Try to wake up at the same time each day to train the body to be consistent.