My method was always just to stay away until I'm exhausted and need sleep. Having a predictable schedule helps with that. I'm usually tired/exhausted by 12 or 1am, and wake up around 7am. If you avoid sleeping in too much/oversleeping, you'll be awake enough to have your body feel exhausted around the same time every day.
For those times when you need to sleep but still have difficulty actually falling, I'd suggest simply laying down, closing your eyes, and trying to empty your mind. Overthinking will keep you up. Just find a tranquil, balanced state, and try to keep that up until you've passed out.