Literally "when you drink water, think of its source", i.e. remember where and how the water came from. Don’t just be thankful for the water: be thankful for all the elements and processes (both past and present) that allowed you to enjoy that humble cup of water.