Aluminum anodes

Aluminum anodes protect well in salt, good in the upper levels of brackish waters, but not so good in the lower levels of brackish, and decent in fresh.
However, Aluminum passifies (films over with oxide coating) quicker than Zinc.
For brackish waters, or switching often between fresh and saltwater, you should consider Aluminum as your sacrificial anode.
It’s cheaper, lives a longer life, and can handle the switch between different water types better than the other metals.

Magnesium anodes

While more expensive than Zinc and Aluminum anodes, and lives shorter lives, Magnesium anodes are your best choice for freshwater. This is especially so, if your vessel will be in the water for long periods of time.
Magnesium’s high current output in saltwater runs the risk of over-voltage (hydrogen release). This can be remedied with either smaller and/or less Magnesium anodes, however a Magnesium anode’s life in saltwater is typically too short to be a good choice there.

Zinc anodes

There comes a time and place where no other material beats Zinc as a sacrificial anode. When it is docked or anchored in seawater for long periods of time.
Zinc anodes are better than other metals at “sloughing” off any film buildup, exposing fresh Zinc alloy to the water, allowing the anode to be continuously electro-chemically active.
Without this improved ability to slough, the consumed metal in aluminum anodes can film over and form a crust/barrier which will passify the anode.
The longer the vessel sits, the higher the chance of anode passivation.
However, when a vessel is underway, the moving water current creates electrical current which puts a demand on anodes, thereby reactivating them.
Cutting through the water also cleans the oxide film off of the anode, whatever the metal type.
If a vessel remains active in saltwater on a regular basis, both Zinc and Aluminum anodes will work.
If sitting for periods of time in saltwater, Zinc anodes are the way to go.