The rail (1) has a support arm provided with removable fixing units (15) e.g. clamping jaws (16) for fixing the arm on a longeron (37) of a bed (27). A front panel is connected with the support arm. The support arm has a front section (5) and a rear section. The front panel is connected with the front section, and a rear panel (3) is connected to the rear section. The front panel includes parallel uprights i.e. bent tubes, each being mounted to pivot on the front section. The front panel is deformable between a raised position and a retracted position according to a deformable parallelogram. Independent claims are also included for the following: (1) a method for assembling a bed rail (2) a medical bed.