If he's allergic, have you tried an elimination diet? If you can pinpoint what he's allergic to, you can maybe improve not only his tummy, but his skin and fur.

If I understand this correctly it sound like the dog is only scratching when it's getting rubbed on the tummy and this is causing the leg to move involuntary. All dogs will do that and it has nothing to with food allergic.