It is very simple.
1. Make a switch called HiredRoom (or whatever you wanna name it)
2. For the Inn NPC event code, put whatever you want him to say, subtract gold if the Inn costs money, then turn the switch HiredRoom on.
3. Put an event on the bed you want the player to sleep on. For the event code, put whatever you want to happen when he rests, I usually put a black screen and the traditional Inn music.
4. At the bed event code, at the very bottom turn the switch HiredRoom off. If you want the player to be able to sleep in all the beds, simply copy&paste the event for the bed to other beds. There are no additional switches needed for this.
This should work.