The mattresses are transported to the designated stacking area through the conveying device and automatically stacked on the floor slab. When the mattresses are placed to a certain number or height enough, the conveying device will transport the whole stack of mattresses and the floor slab to a predetermined position for warehousing. It is characterized by automatic and fast stacking, stable and accurate stacking and placement.