When they decide to take an extended rest, encourage them to think about where might be a safe place to hole up for several hours. They can barricade themselves in an enclosed room or retreat from the dungeon to camp outdoors. Either way, they’ll have a restful night – but they don’t have to know that ahead of time. You might want to briefly narrate some strange noises and disturbing shadows they notice during the night just to keep them on their toes, but let them complete their rest safely.
I love that the starter adventure is encouraging players to plan in non-game terms: not by rolling Dungeoneering checks, but by coming up with reasonable schemes to stay safe overnight.
Of course, it’s all a travesty: the players’ precautions are wasted because there will be no overnight attack. But players’ precautions are always a travesty anyway. Most of the time, players plan elaborate contingencies against eventualities that hadn’t even occurred to the DM. But, as beginner DMs learn from this paragraph, a) it’s all about the ILLUUUUSION and b) players are stupid suckers.
Oh, players! What lovable fools!
I’m always torn about tricks like this one. On one hand, I hate the idea of the DM trying to preserve an illusion of danger when it’s never there. In this case, for example, if the PCs are never going to be attacked while sleeping, it’s annoying to heavily hint that they might be. Because then when they don’t take preparations for whatever reason, they’ll find out it’s all a big sham! Also, as a DM I don’t enjoy pulling tricks like this because I know the danger isn’t real; it feels less like a game and more like a performance I’m putting on for everyone. Of course, it’s okay to drop these hints if you plan to attack the players while they’re sleeping some time in the future but not in this specific instance. That maintains consistency for future encounters so it doesn’t seem weird when you suddenly bring up that the players might want to be careful where they sleep!
On the other hand, I do like some mechanism for limiting how many extended rests people are willing to take, and the risk of danger, even illusory danger, is one of the few tools the DM has to make people careful about resting too much. I like players to be making decisions like “can we make it to through another encounter without dying?”, “Will the mission fail is we don’t proceed immediately?”, and “Will they rally into a stronger force if we give up the initiative?”. If that mechanism is rooted in deceit and trickery, then I guess it might be a necessary evil!