Excellent advice already above.
We had a very similar issue the year one of ours was 10--our high-energy, social, achieving one, but also with the attention span of a flea. Actually, it's one of the major factors that led to homeschooling that one.
In our case, we narrowed it down to
1) too much work for no reason--the school decided arbitrarily that middle schoolers should have 2+ hours of homework a night, so even if a class didn't warrant the requisite amount of homework, teachers made sure there was something you had to do;
2) physical and mental exhaustion after a whole day of being
3) perfect; and, bonus,
4) having to exert extra attention and energy -making up for teachers' errors-! (All the teachers were very sweet and accommodating, as was the administration, but they were seriously struggling with massive curricular and organizational changes, which had not received sufficient inservicing.)
I would agree that the level of executive function (attention, planning, organization, impulse control) necessary to complete assignments the content of which was certainly academically well within range was a big piece of the puzzle. There is something about being 10, too. Old enough that adults start to have expectations of you to be organized and self-managing, but young enough that pre-teen scatter-brain is a fairly routine occurrence. That was also a particularly challenging year for our parent-child relationship (which nightly struggles over homework did not help!). My attempts to work with the school to modify the homework situation did help our p-c relationship, though it had exactly zero effect on the homework policy.