GI's stationed in the rear, cooks, clerks, profiles (sick/injured), mechanics, military policemen, etc. stayed in wood "hootches" with wooden steps. Sometimes they had doors (screens), but often just hanging ribbons of plastic. They were open bays, separated by belt high plywood for privacy-built by the GI's themselves. GI issued folding cots were almost always in the hootches. The roofs were corrugated sheet metal, and the base of all hootches around all sides was chest high sand bags. These buildings were built by Army Engineers or Navy CB's (Construction Battalions). Bunkers (for protecton from incoming artillery) were built between the hootches. Shower points & out houses (latrines) were sometimes a hundred yards away from your hootch.
In the field: Artillerymen dug bunkers to sleep in, which were located circuling their field guns (cannons). When they received a "fire mission" they'd jump out of their holes and man their field guns. Armored Cavalrymen slept on or near their M-551 Sheridan tanks or ACAV's (M-113 Armored Cavalry Assault Vehicles), sometimes on a cot, or crounched up inside their vehicle, much like a person sleeps in their car. Tank crews manning M-48 Patton tanks could sleep in the bustle rack, located at the turrets rear, or the back deck. Mechanized Infantrymen slept on or around their M-113's. Straight leggers (plain grunts) slept crounched up on the ground, usually with 1, 2, or more other GI's at a time for rapid response in case of sudden gunfire or explosions. These fellows had no place to run or hide; all they had was each other to turn to for help. When it rained, "Everyone" got wet, slept wet, woke up wet.
For those stationed on ships, it was the usual situation.