Yes that’s possible.
Natives used (when the frontend menu is already active and configured):
- ClonePed to make a clone of your ped.
- GivePedToPauseMenu to give the cloned ped to the pause menu.
- SetPauseMenuPedLighting to make the “light” come on or off.
- SetPauseMenuPedSleepState to animate the character to wake up or go to sleep with their head looking down.