I have read the book Fidget to Focus and found it helpful. The basic idea is that allowing a child (or adult) to move a little bit helps them focus better than trying to force them to sit perfectly still.
A fidget can be almost anything. There are lots of fidget toys out there. I have found doodling and crochet to work well. Any craft you do not have to spend your full attention on works. Also if you have the style or work desk where people do not see your legs and feet, you can move them a lot without it being noticable.