Rule Logic on mode change

My modes are TOD based - very simple - no problems.

One mode, Sleeping, triggers via mode manager at 1:30am.

I have a virtual switch called 'Awake'. It is on, obviously, when I trigger it via Alexa 'I'm up'.

I want to prevent mode from changing to sleeping until I turn off this switch. so at 1:30, if I'm still 'awake' - stay in the current mode called 'Late Evening'.
If, for example, I go to bed finally at 3 - Once I go to bed I issue an Alexa 'good night'. this toggles the 'Awake' switch. At that point, if it is during the 'sleeping' period, allow Mode to change to Sleeping.
In Mode manager, I cant see a way to block the sleeping from happening.
I can't see how to put this logic together. Suggestions? Is this handled in Mode Manager? Is it a seperate rule?

I just manage my modes with Rule Machine. It's easier for stuff like this.

I don't have a set schedule so I use switches to trigger modes. The only mode that changes based on time is Evening, which triggers at sunset. In the morning, "Alexa, good morning" has Alexa turning on Switch - Day. When I go to bed, "Alexa, good night" has Alexa turn off Switch - Day, and this triggers the Asleep mode.

Is there a way in RM to run Mode Manager? If I could trigger mode manager like a rule - I could set 'run mode manager' and the correct mode would be selected. I can't see how in RM to do that.

Using switches would require rewriting my whole environment and doesn't work well for me. If Mode manager had a 'if switch is on/off'.

Here is how I have mine currently. If you want it to always set the correct mode you'd need to expand the logic to have an appropriate trigger to do the evaluation (maybe a virtual switch) and then expand the IF statements for ranges of time. But it could be done.

As a note my system is put into Day via Alexa and into Night and Early Morning most often by Alexa.

Resolved. thanks for the ideas. I wrote a virtual switch which has a virtual presence (NOT TIED TOGETHER).
When the switch goes On, I turn off the presence for a few seconds. I have mode manager watching for presence of this as well as other presence devices - if any goes off, it says 'away' for that few seconds, then comes home, forcing mode manager to check the mode. kludgey but mode manager not being as robust hoped, it works.