The alarms are triggered at random after you win a battle. The great news is that any battle qualifies, even ones you finish via insta-kill. The alarm will continue going off until you get back to the Velvet Room to either use the power of the alarm or turn it off by talking to the twin wardens.