Anhedral slows down the outward flow of water which effectively gives you longer span without the drag of more span.
It also makes the foil less stable.
Dihedral makes the foil more stable but encourages spanwise flow outward.
Same as an aircraft I presume.
If you want a better understanding here is the short version but google 'wing tip vortices' for the extended explanation..
Basically under the foil the water is being compressed and on top it is lower pressure. The water doesn't like to be compressed or reduced in pressure so it tries to flow from the higher to the lower pressure.
When you are moving along, the only way it can do that is to move sideways out towards the tip. When it gets to the tip it tries to flow around the tip to fill the low pressure on top. It ends up curling around somewhat and on an aircraft you can see this if you have a day where it is cool and moist. The extreme low pressure on the wingtip or around flaps sucks the high pressure air which is somewhat warmer from being compressed and when the two temperatures collide the warm moist air hits the cold mixes and the moisture condenses causing a long stringy curling vortice to be visible.
This curling air is called a wingtip vortice and is pure drag, useless wasted energy.
The amount of air that makes it around the wingtip compared to the span of the wing is one of the main determinations of the efficiency of the wing. That is why sailplanes have long skinny wings.
However long skinny wings are fragile and make a lot of drag at high speeds and can twist easily which can be disastrous and therefore require extra weight in structure reinforcement.
Another solution is to put upward pointing or downward pointing winglets to capture that spanwise air/water flow. Downwards is better for low speed but gives you less wiggle room on landing if the wingtip drops. In a 747 size aircraft, the efficiency gains might be 5%. It also makes the controls feel tighter. (more powerful)
Also sometimes wing fences are put on wings (typically on top) to stop the spanwise flow of air to give enhanced short field takeoff performance.
There is a whole science to aerodynamics and whatever the name is of the water equivalent.