What have you found helps you stay asleep?

My main issue, off and on for over a decade now, has been that I can't stay asleep. I'll wake up at 3 or 4 am after I go to be around 11 or 12 at night and am just WIRED. My brain is racing with a million thoughts and I can't go back to sleep.

I took Remeron for years and added some medical marijuana. That worked for a good while, but I quite weed for good about six months ago.

So far, I've tried Ambien and Seroquel. Ambien, even at the highest dosage and with the controlled release, doesn't keep me asleep.

Seroquel does seem to keep me asleep better than Ambien, but I feel like shit the next day. Poor mood, exhausted and lethargic...

What have people found that helps with this particular type of insomnia (waking up with racing thoughts)?

I just started lamictal, so it's early days. My NP also mentioned Abilify.