The photo above depicts the manner in which the British soldiers of the First World War were expected to sleep within the muddy labyrinthine trench system of the Western Front.
Front line officers would sleep in shifts within dank, little rooms called "dugouts". The rankers were perscribed a hole that was even worse - misleadingly dubbed, "shelters", they were in actuality just oval caves chiseled into the dirt walls of the trench. This page illustrates this issue quite clearly:
"It should be raised at least a foot above the floor level in the trench to prevent water from the trench floor from coming in..."
More articles about W.W. I trench warfare can be read here.