On pre-spaceflight Earth the term mess or mess hall was used for dining and accommodation facilities on ships and military bases. This term has been adopted to refer to areas on space ships, starships, and space stations where officers and crew have meals and spend leisure time. As one of the larger rooms on the ship, it would be used for crew gatherings, movie nights, and formal functions such as entertaining ambassadors. The place where food is prepared (on a ship) is called the galley.
NX classEditThe mess of NX class ships such as Enterprise was one of the few areas of the ship to have windows. Crew members could serve themselves, buffet-style from pre-prepared food and the products of a protein resequencer (precursor to a food synthesizer). The captain had a private dining room adjacent to the mess. (ENT)
On ships like the USS Mumbai, the enlisted mess is on deck G, on the rim of the saucer section, facing aft with a view of the secondary hull. It has seating for at least 48. There is a separate wardroom for officers, and the captain has a lounge as part of his or her quarters. (TOSS #18 , #4 , #16 )
Ships like the USS Enterprise has small mess rooms, generally called rec rooms, scattered throughout the ship. These had tables, chairs, and food slots. As well as eating and drinking, they were used for playing games and making music. (TOS)
Defiant classEditLike much of the internal spaces aboard Defiant class starships, the mess hall was compact, functional and had no windows. It was equipped with one food replicator. The mess hall could also be used for meetings with the ship's crew. (DS9: "Trials and Tribble-ations", "Valiant")
On the Intrepid class vessels, the mess hall is on Deck 2, Section 13, with turbolift access in the corridor outside the starboard entrance. It had small tables with comfy chairs and four food replicators. There was a captain's dining room just behind the mess hall. (VOY: "Phage", "The Cloud")
Klingon Birds-of-Prey, such as the IKS Rotarran, the IKS Ch'Tang and the IKS Pagh had mess halls with décor suited to Klingon tastes. (TNG: "A Matter of Honor"; DS9: "Soldiers of the Empire", "Sons and Daughters", "Once More Unto the Breach")