It works the same in both ways, you just need the height difference and two reservoirs. When you need the electricity, the water flows downstream into the mine reservoir. Then it gets pumped up again when it's cheap. I do wonder about the economic feasability, but maybe I'm underestimating the amount of empty volume available in a mine.