I get this when walking for a long time, or hiking.
When I notice it, I will start clenching/unclenching my hands for as long as it takes for the feeling to go away. Usually a minute or two.
Also, I will then try to keep my hands at waist level, sort of in a jogging position.
Doing those two things together keeps the swelling away.