Milk is a creamy white emulsion produced from the mammary glands of several mammalian species, including the Earth cow and the Klingon targ. (TNG: "In Theory") Containing rather significant amounts of nutrients such as proteins, saturated fats, calcium, and most notably, Vitamin D, it is often consumed on Earth as a beverage. Milk can also be processed into dairy products such as cheese, yogurt, and ice cream, as well as incorporated into various kinds of dishes.
When milk is heated, the amino acid in the lactose it contains is activated, acting as a natural sedative, helping one sleep. Warm milk was Lt. Reginald Barclay's drink of choice on the USS Enterprise-D. (TNG: "Hollow Pursuits") Captain Picard's aunt Adele had a recipe for steamed hot milk toddy with nutmeg, which Picard shared with Doctor Crusher. (TNG: "Cause and Effect")
On two separate occasions, Dr. Crusher prescribed a glass of warm milk toddy to Commander William T. Riker and Jean-Luc Picard (with a dash of nutmeg) to help them sleep. (TNG: "Schisms", "All Good Things...")
Quark prepared warm Enyak's milk when Kira Nerys appeared "rumpled." (DS9: "Ties of Blood and Water") Similarly, Q suggested warm Kylerian goat milk to Captain Kathryn Janeway when she was having trouble sleeping. (VOY: "Death Wish")
Geordi La Forge compared the spaceborne species dubbed Junior feeding on the energy of the USS Enterprise-D to an infant being fed with milk. In order to dispose of the creature which was rapidly draining the ship's power, he realized that he had to "sour the milk". (TNG: "Galaxy's Child")
On some replicators, a milk button was available for easy manual input.