I've been experiencing something like this too..
I'm really insomniac due to mental health stressors and chemical imbalances. I honestly might die if I don't use meds to put myself to sleep for 2 weeks straight.
That being said my meds are correcting the chemical imbalances. And I get to notice as I try to fall asleep after a high stress day I'll ruminate too hard and I'll stay awake after the "put-down" pill wears off, (then I gotta decide to give up on sleep all together or damage myself more with another pill).
I'm not a doctor (just traumatized). Ruminations come from anxiety sometimes, try to recognize what you're actually actually doing to prevent yourself from sleeping.
I read this thing's entire wiki page and it's fascinating!!