Normally the stratum corneum is relatively dehydrated, but it absorbs moisture and swells up when soaking. This swelling occurs throughout the soles and palms, but it is most noticeable in the fingers and toes because of their restricted dimensions. This is the "wrinkled prune" effect caused when a person had spent a prolonged time in water.
In extreme cases, for example, the so-called immersion foot syndrome, which sometimes occurs among soldiers whose feet stay wet for prolonged periods, the entire sole can wrinkle up and become painful to walk on.
The principle is the same in any case. Since the underlying tissue does not absorb water, the stratum corneum cannot spread and instead buckles.