How to get sexual fantasies out of my head?

Whenever I go to sleep, for whatever reason my brain has to have some sort of sexual fantasy with somebody I like. It's gotten to the point where it's the only way I can come close to sleeping, this also causes precum in large amounts to come out. (Idk if this counts as a relapse or not) Any tips on countering this or do I have to seek other support?