Just wanted to share my solution to put the cabinet to sleep anytime (using XP).
1. Create a shortcut on the desktop with the following command
%windir%\system32\rundll32.exe powrprof.dll,SetSuspendState Hibernate
2. Set the shortcut key to one of the F1-F12 keys. I use F11.
(other keys will not work since they require ctrl+alt)
3. Map one of the buttons on the cabinet to the Fx key. I use shift+esc on my JPAC.
Now I can just press shift-esc anywhere (in a game, in the frontend etc) to close down.
Only problem I noticed is that textures on the graphics card is not restored after hibernate so some games (not mame) might look strange.