A food-for-thought question from a biochemist who doesn't know much about water lilies specifically: your question assumes that it's the opening/closing that requires energy, but another possible mechanism might be if the default, relaxed position was closed, and energy needed to be expended during the day to keep the flower open (or the inverse, where the open position is the default, relaxed position, but then at night, energy is continually expended to keep it closed). I suggest this based on how I know many of the molecular mechanisms of plants rely on turgidity (swollenness from water) to evoke structural changes.
It doesn't change the question materially, it just involves looking at the question from different angles. I don't know much about water lilies though, I didn't even know that they close at night. I might report back here if I find anything interesting.