They had bunkbeds. None of them were sleeping in the hallway.
If you're thinking of what I think you're thinking of: Kirk, Spock, and company found Yeoman Burke and Samno not asleep, but dead in a corridor. High stun at close range. Courtesy of Valeris.
I was actually thinking of the scene on Excelsior when Praxis exploded. About 1:13 in...
Then again, its really hard to tell.