Just to clarify the stomata don't need anything special to operate, it all depends on which pathway is being used and what the environmental conditions are around the plant. Basically the only reason the stomata will close is to prevent water loss.
So I think what will answer your question is that stomata work during the night, in some plants, by storing CO2 for future use. (more energy is necessary to introduce it to the Calvin Cycle)