It was late,and by that time they were feeling quite happy.
and 连接的两个并列句,用逗号隔开;
by that time 在后半句中式时间状语,后面是过去进行时.
One of them got in with his head at the top of the bed.
One of them got in 这是句子的主干,主谓结构;
with his head at the top of the bed 这一小节是with的伴随结构,做伴随状语.