That expression comes from the days when people slept on beds filled with dried grass or hay. 过去人们躺在干草铺的,这个俗语就来自那个时代。
Some people slept on hay in barns where they kept their farm animals. 有的人睡在马房的干草上,他们在那里饲养牲畜。
Hitting the hay simply means going to bed. 倒在草堆上意思是去睡觉。
That is a good idea. I think I will hit the hay now. 那是个好主意,我想我现在要睡觉了。