This effect occurs when electrons are transferred from one material to another. The electrons do not move around the material (like they do in a wire or in a light bulb) but remain fixed at the point at which they transfer, hence the name static electricity. Some materials are electron donors and some are electrons acceptors. For example, if you rub your hair with a balloon, the electrons transfer from your hair to the balloon. Since all the hairs have a positive charge the repel each other. Since the balloon has a net negative charge, it will be attracted to neutral and positively charged objects, such as your shirt. Now here is my theory on what is happening with the wool trousers and socks. I assume the socks are not 100% wool, but contain a bit of elastic or other synthetic material. This synthetic material is acting like the balloon, and the wool trousers like your hair, to generate a static charge. The socks scrape electrons off the trousers to become negatively charged and the trousers therefore become positively charged. A possible solution would be to wear socks with no synthetic materials, or at least no elastic. Maybe a wool + silk blend. You could also experiment with ankle socks to see if the cling disappears.