In general, I'd say this is a bad idea, but there are several factors to consider. The most important is if the kobolds know where the PCs are. If they do, you have to determine if the kobolds can break into where the players are. If they don't, you have to figure out how likely the kobolds are to find the PCs, which should be partially determined by the size and layout of the lair, plus the intelligence of the kobolds.
It sounds like the kobolds might know where the PCs are. If they have some magically way of sealing the entrances, the kobolds will have to wait. If they just block up the door, the mass of kobolds will probably be enough to break through (I'd force someone to forgo the long rest to keep the barricade closed, requiring a fairly easy Str/Athletics check each hour). You might also consider if there's a way in the players don't know about, such as a chimney or secret door. In any case, this is going to be bad for the PCs.
If they don't know, then the PCs are in a bit of luck. Kobolds are generally stupid and lazy, so they shouldn't have a great chance of finding the PCs. The size and layout of the lair matters though, because hiding out in the chief's room is going to be discovered much faster than an out of the way storage room. I'd suggest an Investigation check each hour for the kobolds, with the DC ranging from 5-20, depending on how likely the kobolds are to discover the party's hiding place. Once found, see the prior paragraph.