Use small treats to reward calm behavior around human food. Stay consistent.
Rewards
Say "no beg" firmly when they beg. Reward them for settling down after a beg by placing a treat on the floor.
No Beg
Teach them "place" by rewarding them for laying on a designated spot while you eat. Release them when done.
Place
Hold a treat in a closed fist. Open when they stop trying to get it. Reward calm waiting.
Wait
Place food on floor. Say "leave it" if they approach. Reward for backing away from the food.
Leave It
Say "off" if they try to counter surf. Reward all 4 paws on the floor.
Off
Have them sit/stay in a "heel" spot next to you during meals for treats. Release when done.
Heel