Ready to kick off?
Ok, so let's start with Wiltshire Mum's question.
With any unwanted or unexpected behaviour, I'd always ask two questions:
1) What might be the trigger for this behaviour, or the 'driver' for it?
2) How might the adults work with the child to reduce the triggers/drivers and make small steps towards responding differently to them?
So, on the first question, it's worth considering whether your son is in need of a sensory break - something to satisfy a need for proprioceptive input. It can be hard sitting still for long periods if your body craves movement and if that's the case, it sounds as though he has found a pretty measured way of dealing with it. How is his physical development? For children with poor core strength, sitting correctly on a chair for long periods can be physically tiring - they need regular movement breaks to re-set, stretch and refresh tired muscles. Alternatively, perhaps as he's been struggling academically due, as you say, to missed schooling etc. he may have some level of anxiety about being able to do his work, or even trying to do it. He may find that walking away keeps him feeling calm. Even if he struggles most in Literacy and Maths, anxiety would possibly still be present throughout the day, so it wouldn't surprise me if the wandering was happening at other times too. Anxiety can be a powerful driver of behaviour and it doesn't always manifest in the most obvious ways - avoidance behaviour is not unusual. Without knowing your child, I can't be sure, but it's worth considering.
You might have some ideas of your own - or your son might be able to offer some suggestions. It's definitely worth asking him.
The answers to the first question will dictate the direction of the answers to the second, but I'd be looking at starting where he is currently at, and taking tiny, supported steps towards where you and his teachers would like him to be. Dealing with this sort of thing by punishing and consequences is like the fairground game where you bash chipmunks with a mallet - it might appear to squash the behaviour, but the trigger is still there, and will pop up again in another form!
So, at the moment he needs to move around the room. Let's accept that, and then see if we can have it happen in a more controlled way. Could the teacher introduce opportunities for sanctioned wandering? So, for example, "I need you to do 3 more sums and then please can you take this book over to the shelf", while simultaneously reducing the opportunities for unsanctioned wandering by, for example, having sharpened pencils always available, and tissues on his desk? Alternatively, could the teacher introduce a system where your son indicates his need to wander in a subtle way, but then has to wait for the teacher to acknowledge that before he goes away from his desk - "If you need to leave your desk for any reason, please put this green card on the table and wait for me to say ok." Rewards do not work for all children, but if your son responds well to praise or rewards, then that should be focused on recognising when he uses his card, or waits until he's done the three sums, or whatever has been decided. So, we're not asking him to ignore his need, but we're asking him to work towards meeting it in a different way, and positively recognising when he starts to do that. It's likely that between you all - the teacher, you and your son - you can probably come up with some small changes that will meet your son where he is at, while beginning to allow the adults to be safely in charge in the classroom, as they should be. Once that has been established, tiny steps can be taken towards reducing the amount of wandering.
At the same time, it would be good to make some changes to reduce the triggers or drivers of the behaviour. These two things needs to work in tandem. So, depending on what you feel is driving it, it may be related to providing opportunities for proprioceptive input, looking for ways to lower anxiety generally, ensuring that he understands and is able to do his work with adult support available, even ensuring that his chair/clothes etc. are not uncomfortably distracting. Getting this part right will take a bit more understanding of your son and his needs than I have, but it's really a two-pronged approach - changing the environment/trigger/driver as well as supporting your son to change his behaviour response little by little.
Hope that's helpful!