You might have two simultaneous problems: The water level of the lake behind the dam might be lower than desired, and the rate of water flow into that lake from the upstream river might also be lower than desired. In that case, it'd be advantageous to use the excess power to recapture some of the "downstream" water and pump it back into the lake, thereby restoring the lake level more quickly than would be possible with just the (inadequate) incoming upstream river water.
I don't think a facile analysis of the economics is interesting.
For instance, if you shut the dam off, then it is generating $0 revenue for that period. Is that a better use of capital than adding seemingly redundant pumps to recapture some of the (time shifted) flow?