I struggle with insomnia too, and how to take ambien without sleeping through things. This is just a crazy, practical suggestion from my years of working 100 hour weeks in a critical setting. It needs a "kinda gross" warning more than a trigger warning. When I was on duty call at night, I would keep the phone near my ear, and make a huge cup of coffee before bed that just sat right next to the phone. The minute it rang( or my alarm went off) I would drink down the whole cup of cold coffee or even espresso depending how tired I was. Once it hits your system, you just aren't going back to sleep.
Sleeping through things gives an immediate out-of-control feeling to life, with shame , apologies needed, and consequences I don't want, so that is my not-so-appealing solution. Cold coffee . Immediately. It works.
I have therapy this morning, so the minute my alarm went off, I drank down a big cup of coffee while snuggling with my dog. I am sometimes ambivalent about therapy or even nervous about going, so I can see how going back to sleep could act some of that out and then later lead to feeling devastated.