DS is gifted in Maths (and doing very well in all subject, in year 6) and teachers have been good at giving him extra work in the classroom, they often split the class and give specific time and work to the more advanced children (especially now in year 6 with SATS around the corner). They give him special projects on top of usual work (for example, he really likes airplanes so they give him research projects to do when he has finished his work on any given subject).
Best thing to do is, in my opinion, stop 'blaming' your DS's cleverness for his bad behaviour. Please separate the two. Loads of middle-achieving children don't behave well too you know, and loads of very clever children behave extremely well, despite being bored on occasion. So work with the school on the behaviour, and work separately with the school to support more advanced work in maths.
Something else you should consider is that many, many children 'perform' better at home in maths, as there is one-to-one support from parents/tutor, with no distraction from other children. In class, children have to work things out by themselves, on their own, with loads of distractions so they will often perform not as well in the classroom compared to home.
Finally (sorry this is very long), many schools now work on the principle of 'mastery'. They won't move a child along the curriculum once a child understands a specific topic, they will try and encourage the child to learn it with more depth. Initially, I wasn't too keen on this but in good time, and talking to the school to really understand what this was about, I can see real improvement in my son's 'performance' as he really understands different ways of solving maths problems, often working out his own ways of solving a problem. Also he is a lot less stressed about performing at school, he is much more focused on really understanding, and explaining what he can do. I hope this helps.