The tough outer layer of skin is protein made by the living cells underneath. Like other proteins, it swells up when it is soaked in water. But it can't expand evenly in all directions because it is attached to the layer underneath. As it swells outward in some places, it pinches inward in other places. That makes wrinkles. But don't worry. Your skin will smooth out again as it dries.
You may wonder why other parts of your body don't wrinkle up as much as the fingers and palms. The layer of skin that swells and wrinkles is thicker on the palms of your hands and the bottoms of your feet than it is on most other body parts. Thar's why the skin on your palm wrinkles more than the skin on the back of your hand.