My horse is boarded 24/7 outside, even gets her grain outside. She also only does this when I leave her for maybe 3 minutes. I believe it was because she never was left alone when she was a baby so she is used to always having attetion when she doesn't have any. So she tends to do everything she can to get at least some kind of attention even if it's just a look.
If your mare paws when she is bored give her something to do. A toy, teachieving her a trick, etc. How often are the stabled? If they're stabled most of the time look into turning them our of giving them regular exercise or even just time to stretch their legs.
Your gelding is pawing due to natural instinct to forage for food, if you have ever watched them outside in the fall or with snow covered ground they pay to get the grass to eat. Your mare is showing impatience and generally the "Dad Voice" of No! gets the point across quickly.
I give my mare a smack on the shoulder but most times I just clap or say "hey" and she stops. I've never met it escalate, she knows it's bad. (although this is not a habit for her, she rarely does it.)