So there's any number of things that might be happening: The mice might have been trained with food. If they expect a reward for completing the intelligence tests, then it makes sense that they'd focus intensely on carrying the tests out successfully just to follow through their drives.
Alternatively, it might be a general increase in focus coupled with the absence of any way for them to satisfy their drives gets "redirected" into focusing on the task at hand. When I'm hungry or really badly want something I can't have then and there, I'll often find I can be super-efficient, though feeling restless. Of course the problem is if there's any way I can turn to satisfying my desire for ice cream instead at that point, I'll grab it.
Third, it is not a given from the description that the mice will be feeling hunger. When doing intermittent fasting (18 hour fasted, 8 hour eating window), I feel hunger only for the first day or two. Past that, I start feeling apathetic to food, and need to focus on eating enough in my eating window. Yet I still feel much better outside my eating window. My self-control in terms of food in particular is rock bottom the first day or two, but if I make it past that, I'm good. (When I go off IF in periods, it is actually usually because it gets incredibly tough for me to eat enough while meeting my protein goals for my power lifting, for extended periods of time)
Or, of course, the study might just be severely flawed.
Though for my part when I pull all-nighters I tend to try to avoid eating - I'll drink very low calorie drinks (very diluted juice, at around 10kcal per 750ml glass for example) slowly, and that seems to work better for me in terms of maintaining focus than downing lots of calories. Coupled with my experience with intermittent fasting, I'd much rather be in a semi-fasted or slightly hungry state when trying to focus on something important, than full. (Though at the end of an all nighter, the fatigue often means I find myself "out of control" eating wise the following day, at which point I often make a decision to "surrender" and just subtly try to "give in" to the least damaging urges rather than sticking firmly to diet, in order to retain as much as possible of my by then very limited willpower for more important stuff until I've rested; to me that also feels like it works better - then again it could also just be that believe is just my brain chemistry convincing me to continue feeding it sugar.... ;) )