A process for the production of prefabricated insulating panels for roofing of buildings, comprising the steps of: a) longitudinally advancing two sheets (102, 103; 102, 3) in a direction of advancement, generally superimposed to each other so as to define a gap therebetween, wherein at least one first sheet (103; 3) is shaped so as to define one respective longitudinal rib (6A, 6B) at at least one of its two opposite side edges (103a, 103b), b) applying on the surface of a sheet (103; 3) that faces the other sheet a chemical product capable of expanding, while the sheets (102, 103; 102, 3) are advancing in the direction of advancement, c) causing expansion of the chemical product while the sheets (102, 103; 102, 3) are advancing in the direction of advancement, such that the expanded chemical product fills the gap between the two sheets (102, 103; 102, 3), wherein step c) comprises the operation of occluding the gap at the side edges (103a, 103b) of the two sheets (102, 103; 102, 3) for laterally containing expansion of the chemical product, while the sheets are advancing in the direction of advancement, the operation of occluding the gap being carried out at at least one first side edge of the sheets (102, 103; 102, 3) by means of a succession of containment members which are movable in the direction of advancement, the process being characterized in that, prior to step c), at least the first sheet (103; 3) is bent to define at least one ridge line (11, 11') that extends substantially orthogonal between the two respective side edges (103a, 103b), the profile of the side edges (103a, 103b) of the first sheet (103; 3) thus being variable, and in that the operation of occluding the gap is carried out by means of containment members that are displaceable also in a generally vertical direction, in opposite senses, the containment members being movable from above down and from below up, or vice-versa, for adapting the position thereof to the profile of the first side edge of the first sheet (103; 3). a) longitudinally advancing two sheets (102, 103; 102, 3) in a direction of advancement, generally superimposed to each other so as to define a gap therebetween, wherein at least one first sheet (103; 3) is shaped so as to define one respective longitudinal rib (6A, 6B) at at least one of its two opposite side edges (103a, 103b), b) applying on the surface of a sheet (103; 3) that faces the other sheet a chemical product capable of expanding, while the sheets (102, 103; 102, 3) are advancing in the direction of advancement, c) causing expansion of the chemical product while the sheets (102, 103; 102, 3) are advancing in the direction of advancement, such that the expanded chemical product fills the gap between the two sheets (102, 103; 102, 3), wherein step c) comprises the operation of occluding the gap at the side edges (103a, 103b) of the two sheets (102, 103; 102, 3) for laterally containing expansion of the chemical product, while the sheets are advancing in the direction of advancement, the operation of occluding the gap being carried out at at least one first side edge of the sheets (102, 103; 102, 3) by means of a succession of containment members which are movable in the direction of advancement, the process being characterized in that, prior to step c), at least the first sheet (103; 3) is bent to define at least one ridge line (11, 11') that extends substantially orthogonal between the two respective side edges (103a, 103b), the profile of the side edges (103a, 103b) of the first sheet (103; 3) thus being variable, and in that the operation of occluding the gap is carried out by means of containment members that are displaceable also in a generally vertical direction, in opposite senses, the containment members being movable from above down and from below up, or vice-versa, for adapting the position thereof to the profile of the first side edge of the first sheet (103; 3).