Plants control their water consumption via adjustable pores (stomata), which are formed from pairs of guard cells. They open their stomata when there is a sufficient water supply and enough light for carbon dioxide fixation through photosynthesis. In the dark and in the absence of water, however, they initiate the closing of the pores.
Source:
phys.org