That depends on whether you've got photosynthetic or abiotic algae. Blue-green algae produce oxygen.
One theory on ice-ages involves what's basically pond-lilly taking over the Arctic, which at the time was a shallow sea with a freshwater lens over salt water.
Cyanobacteria would still use oxygen when there is no light, and other nutrients. By allowing them to burst in numbers they would easily suck it all out of the sea.
Specific mechanism is described here. It's the bacterial decomposition of the algae rather than the algael bloom itself which directly prompts the issue.
A bit of hair splitting, but useful for understanding what's going on.
One theory on ice-ages involves what's basically pond-lilly taking over the Arctic, which at the time was a shallow sea with a freshwater lens over salt water.