Yes... they are actually. From my experience, they like the small spaces better than the larger ones. My ball python was in a nice, large, well decorated and covered cage. He started to have poor sheds, though his humidity was always around 70%, he stopped eating, and overall seemed to be in deteriorating health. I finally broke down and got him into a rack, and it solved my problems overnight. He resumed eating within a week, and has yet to have had a bad shed. I can only assume that the living quarters before were "too large" despite having heavy cover, a 90 degree hot spot, and proper ambient temps/humidity. The corns don't really seem to care either way what they live in. May it be a box or a viv, they are just the same. I put the more flighty snakes in a rack fer sure though, less stress on them.
Over all, snakes like tight spaces. In the wild, they live in animal burrows, under rocks, etc. They only really go out when they need to hunt/breed etc. So in captivity, the snake is getting fed on a weekly basis, and if it can sit under the hide or in a small space 95% of the time, it will be just as happy, if not more so, living in a box.