How can I make the dangers of a long rest not arbitrary?

I've been reading up on the methods to prevent players from the famous "15-minute workday", resting up after each fight. There are a lot of interesting solutions, like introducing a time constraint, or making the dungeon change due to time passing. See for example How do I prevent retreating to rest and heal from being tedious.

However from a RAW point of view, it appears that interrupting a long rest by DM action isn't all that easy, as players can fight 59 minutes without their rest being interrupted. It is more a question of the DM inventing some sort of punishment every time the group wants to rest "too early". And if the consequence of resting is arbitrary, the players don't know when a long rest is actually supposed to happen.

So I would rather have some guidelines how dangerous a long rest really is. Is there any system to determine the number of random encounters and the difficulty of those encounters a group would be likely to have if resting in a dungeon or in the wilderness? If I have some basic rules on how often to roll and some base values for probability, I could adjust them for example if the players rest just outside the dungeon, or in a room with doors barred.

TLDR: I'd rather use some dice rolls to determine consequences of a long rest in dangerous environments. What would appropriate probabilities for a random encounter be, and how hard should it be?

• Have you taken into account that you can only benefit from one long rest in a 24 hour period? Commented Apr 1, 2017 at 17:31

The DMG discusses random encounters, pp. 85-87.

One application of the guidelines presented there might be:

• Every hour the players are resting in a dangerous area, roll a D20. On an 18 or higher, a random encounters occurs.

• If there is a random encounter, roll a D6:

• 1-2 : A single hostile monster of CR equal the the party's average level.
• 3-4 : A group of hostile monsters whose adjusted XP total constitutes a medium encounter (DMG, pp. 81-85) for the party.
• 5-6 : A group of monsters whose adjusted XP total constitutes a hard to deadly encounter for the party, but which will give the party an opportunity to (perhaps for a price) leave the area unharmed (ending their rest).

You can of course pre-determine specific monsters or groups of monsters appropriate to the environment and your party's level ahead of time.

This system means that during an eight hour rest, there's a ~72% chance the party will have at least one random encounter.

Also remember that characters who haven't completed a long rest get no benefit from the rest, so during such a random encounter, the characters will be as depleted as they were when they began the rest. And, of course, once the players complete a long rest, they must wait 16 hours before they can start another 8-hour long rest period that they would benefit from.

So firstly, in my experience, the best non-arbitrary punishments for my players resting too much have always been plot-driven. Simplified examples: Go save the queen! Stop the dastardly plot, rescue the princess, find the ancient piece of treasure, collect all pokemon. If the party doesn't go fast enough then: The queen is executed, the dartardly plot kills millions, the princess is turned into a vampire queen, someone else got the piece of treasure first, and all the pokemon died of boredom.
I consider players abusing long rests to be a plot/roleplaying problem, and tend to treat it as such. However, I would still roll to see if any encounter happened during sleep if there was potential danger. My solution doesn't have as much rigor as you're looking for, but if my D20 hit a 19 or 20, then I'd make an encounter, and the encounter size would be based on the relative danger of the area.

• "all the Pokemon died of boredom" might be better stated as "all the unique, Legendary Pokemon were already caught". Makes more sense, and implies powerful forces have fallen into the hands of rivals or enemeis. Commented Apr 1, 2017 at 20:23
• I use that solution when I make my own adventures. However we often also play WotC published adventures, and there frequently isn't a time constraint to the story and it would feel somewhat artificial to add one. Commented Apr 2, 2017 at 4:55

I've never been the DM, but mine has homebrewed the following:

1) One character tries to find a nice spot to camp by rolling survival and others may help. The higher the result, the safer the spot.

2) The group has to define an order to keep watch during the rest - we usually split in two watches. If the first watch is attacked (consequently, the other guys haven't rested yet), we all fight as if we haven't rested. If the second watch is attacked, only the guys from the first watch, who should be resting now, fight as if they haven't rested yet.

3) Taking both the survival check and the risk of the surroundings into account (ex: a swamp is riskier than a given village's borders), the DM rolls a d100 for a random encounter for each watch. He defines "standard" random encounter intervals for the d100 encounters which increase or decrease based on how good the survival result was. Encounters are easier or harder depending on the d100 result.

We've never "15-minute workday'ed" by those rules.