It isn’t unusual for hogs to stay rolled up for quite a long time. Initially, it may be that one of them wasn’t happy having the other one with it in the box and biffed it, causing it to put it’s spines up/roll up and get stuck in/near the door way, so that neither could get out. They would have eventually sorted it out if you’d left them (although it may have taken a while for them to get out, as the biffer may have re-biffed the hog, every time it started to unroll/put it’s spines down) but it probably won’t stop them from returning – or at least the one in the box, if it ate before leaving. The other one, who potentially was biffed by the other hog, might not be quite so keen, but probably will return – but might not be so keen on going back in the box with the other one. Having said that, some hogs seem to return night after night, despite being biffed and re-biffed.
You might like to make another feeding box. Hedgehogs are solitary animals and some take great exception to having to share a box with another! Or maybe make another box with two exits?