You can look to the solutions that are employed at tables, since bg3 "draws alot of inspiration" from 5e. Since even at a roleplaying table where group fun is the main goal, you can never ever punish someone for using mechanics optimally.
Since player agency is the most important feature, I think it would be a bad idea to just say "you can't rest here". The question is how the probability of having a successfull rest changes with the circumstances. I read about "not being able to rest in dungeons". Why shouldn't you in general be able to do that? You always can try to relax, lie down and even sleep. But there is always the possibility of an encounter.
It would even be bad to say "the situation is so dangerous that you cannot relax". who is to tell me how my character experiences the situation. mabye the character is a psychopath just in need of some shuteye. Characters can always attempt a rest and always be interrupted. The only real save (if you are not hunted by some assassins) resting place is an inn. You could do skill challenges to determine how save your rest is, investigation of the environment, survival skills for camouflage that get boni from tiny huts or something.
I'd rather not see more restrictions on how often I can attempt to rest but rather the possibility of always failing a rest attempted not in the confines of civilization.
I like the idea of "not getting the best result" or even failing quests when waiting too long, but it has to be - from quest to quest - communitcated that it is urgent and why. You can easily justify it for a hostage situation. for a quest that you took of a notice board- not so much.
essentially: never restrict player agency and always justify consequences in-world .