Well of Bethlehem
It was water from a Bethlehem well for which David in the wilderness longed. To appreciate his desire, one needs to know what thirst in the wilderness means, and also be acquainted with the cool water of the Bethlehem wells and cisterns. In the hillsides around Bethlehem are terraced vineyards, and most of these have a rock-hewn cistern located in them, which collects rain water in the winter months and preserves this water in a delightfully cool condition in the hot summer months.
The men of Bethlehem boast of their cool water. One man was given a drink, but expressed a longing for water out of his father's vineyard, saying that it was so cold that he couldn't drink an entire glassful without taking it away from his lips at least three times.
Thus David, stationed at the cave of Adullam, and living in the parched wilderness, and weary from fighting, said: "Oh that one would give me drink of the water of the well of Bethlehem. which is by the gate" (II Samuel 23:15). When three of his men risked their lives in fighting Philistines in order to secure for him some of this cool Bethlehem water, David "poured it out unto the Lord" (II Samuel 23:16). This was according to the ancient custom of a libation offering, or the pouring on the ground as an act of worship, wine, or oil, or milk, or honey, or water. Sometimes these drink offerings were poured by the Hebrews on the animal sacrificed to the LORD. In doing what he did, David was giving to the LORD the drink of water that had cost so much for the men to secure for him. [Manners And Customs of Bible Lands]
Read More about Well of Bethlehem