Is there a RAW way to allow the PCs to recover only some of their spell slots etc?

My party were rather foolhardy and have got themselves knocked out and captured. Their captors want to keep them alive for a bit to question and then to sacrifice.

The party expended pretty much all their resources in the battle and so without a long rest are not going to have much chance of escape. However, it also feels wrong to say "you spend the night tied up in a stable and now you have all your spells and HP back". Which would make escape probably quite easy and anticlimactic.

Is there a way to reflect that they got some rest, but not a good night’s sleep?