I tried locking mine up when he was being sick, and he started crying every hour for about 5 minutes, and scratching then would stop, then once again an hour later he would start.
I found giving him some company, such as another cat, calmed him down. I also threw one of our old bed comforters in a room with him, with a litter tray, food water, and a bed, with the light off. This calmed him down. I gave him a quick cuddle before bed, settled him into his box, said night then left Thank goodness something worked!!