It’s not a good analogy because the side effect of drilling is exhaustion, and the side effect of solving math problems is knowledge.
In the short term the side effect is exhaustion, in the long term you build your bodies muscles and physical capacity. Something similar happens with knowledge work.
People commonly get mentally exhausted from solving hard problems?
I've been mentally exhausted solving for distributed data complexity between various authenticated systems so I imagine a math expert would get exhausted on those problems. Just as I've built muscle exercising and getting fit by being paid to do physical labor in college. I think the analogy has some value.