Polymer based wetting agent molecules have a polar, hydrophilic (water attracting) end and a non-polar end, so when the wetting agent is added to the water, the polar end bonds with water molecules (water molecules are dipolar in that they have two positively charged Hydrogen atoms and one negatively charged Oxygen atom) and the other, non polar end bonds with the non-polar organic coating on the sand particle. This allows the soil to re-wet, albeit temporarily, it isn’t a cure, just a treatment for the symptom.
The re-wetting effect will last as long as sufficient wetting agent remains bonded to the sand particles, but water repellency and the associated dry patches will return when this is no longer the case. That is why it is important to work on the soil eco-system as a whole to effect a cure for the underlying issues of imbalance brought about by excess sand and the routine use of inorganic fertilisers and fungicides over decades.