I'd say it could be dry skin or maybe an allergic reaction to something.
It only happens during these two situations and not any other time? Maybe it is more noticeable at these times...
Try cornstarch (generally used for cooking)... however it has other uses as well.
Apply this to your testicles like a powder and that should tame the itch. Has a soothing effect...
~Zig