I'm told that in most insect stings the "stinging" part is acidic (e.g. formic acid). Therefore, alkaline substances can reduce the pain and inflamation. Evidently toothpaste works. I know ammonia works. I'm told (but have no more to say on the subject) that urine works.
Let me caution you that if the sting involves an envenomation (like Brown Recluse or Black Widow spiders)you're not addressing the real problem with afterbite-like products. Similarly, I believe that the stinging per-se is not a good indicator of whether you are going to have a histamine release and possible severe alergic response to a bee or wasp sting. I'd be interested in hearing from our MD members.