Yeah I agree with the don't try to stop thinking. Read in a book someone that's just bad for you. Ofc the book topic was selling concentration
Depends on what type of thoughts.
Actual thoughts, impulsive thought, obsessive-chain thought, thought from nowhere.
If the thoughts don't sound like you, then sorry, you're screwed.
Kidding.
All I can recommend is:
Wind down before bed (no screen 1-2 hours before, not even phone)
Set focus elsewhere such as cold shower, hot waterbottle even.
Could try acknowledge the thought/thoughts, avoid attaching any emotion or judgement, remain calm/relax (ie not stressed which will have the opposite effect), then just watch the thought, possibly verbally diminish it, "well this is boring, stupid thought" whatever.
Actually tried this in the store the other day for anxiety. Focused on creeping up tension/incomming anxiety, and "come on Anxiety where are you, and mocked my anxiety a bit, lol, hey it worked!"
Whatever you do, don't try to not thinking abotu thought, as i'm sure you already know, will just make it more persistent.
For CBT which is simple and can do at home by self, search for TEA - Thought Error Analysis. Good stuff.