A device for the formation of layers (S1, S2, S3) of mutually superposed products to be packaged, comprising: - a stacking surface movable in a substantially vertical direction, on which the layers (S1, S2, S3) of products to be packaged are superposed; and - a pair of substantially superposed conveyors (7, 9) to feed said layers (S1, S2, S3) of products to said stacking surface; - a pair of substantially parallel and substantially vertical walls (31A, 31 B), between which said layers (S1, S2, S3) of products are inserted by said conveyors (7, 9), when they are stacked on said stacking surface, and wherein said walls (31A, 31 B) are reciprocally movable towards and away from each other to take a position of greater reciprocal distance, in which said walls do not interfere with the products placed on the stacking surface, and a position of lesser reciprocal distance, in which they interfere with the products inserted therebetween; characterized in that said stacking surface, said conveyors (7, 9) and said walls (31A, 31B) are designed to be controlled in a coordinated manner to perform the following operations in sequence: - depositing a first number of layers of products on said stacking surface; - lowering said stacking surface, with said first number of layers deposited thereon, by a degree at least equal to the height of said first number of layers of products, with the walls (31A, 31 B) reciprocally distanced so as not to obstruct lowering of the products; - moving said walls (31A, 31 B) reciprocally towards each other; - inserting a second number of layers (S2, S3) of products between said walls (31A, 31 B) by means of said conveyors (7, 9), the distance between said walls (31A, 31 B) being such as to cause friction between the products and the walls. - a stacking surface movable in a substantially vertical direction, on which the layers (S1, S2, S3) of products to be packaged are superposed; and - a pair of substantially superposed conveyors (7, 9) to feed said layers (S1, S2, S3) of products to said stacking surface; - a pair of substantially parallel and substantially vertical walls (31A, 31 B), between which said layers (S1, S2, S3) of products are inserted by said conveyors (7, 9), when they are stacked on said stacking surface, and wherein said walls (31A, 31 B) are reciprocally movable towards and away from each other to take a position of greater reciprocal distance, in which said walls do not interfere with the products placed on the stacking surface, and a position of lesser reciprocal distance, in which they interfere with the products inserted therebetween; characterized in that said stacking surface, said conveyors (7, 9) and said walls (31A, 31B) are designed to be controlled in a coordinated manner to perform the following operations in sequence: - depositing a first number of layers of products on said stacking surface; - lowering said stacking surface, with said first number of layers deposited thereon, by a degree at least equal to the height of said first number of layers of products, with the walls (31A, 31 B) reciprocally distanced so as not to obstruct lowering of the products; - moving said walls (31A, 31 B) reciprocally towards each other; - inserting a second number of layers (S2, S3) of products between said walls (31A, 31 B) by means of said conveyors (7, 9), the distance between said walls (31A, 31 B) being such as to cause friction between the products and the walls. - depositing a first number of layers of products on said stacking surface; - lowering said stacking surface, with said first number of layers deposited thereon, by a degree at least equal to the height of said first number of layers of products, with the walls (31A, 31 B) reciprocally distanced so as not to obstruct lowering of the products; - moving said walls (31A, 31 B) reciprocally towards each other; - inserting a second number of layers (S2, S3) of products between said walls (31A, 31 B) by means of said conveyors (7, 9), the distance between said walls (31A, 31 B) being such as to cause friction between the products and the walls.