The gap filling device includes a movable ramp that is movable in a horizontal direction between a retracted position within a housing arranged under a floor of the rail vehicle, and a deployed position extending out of the housing. The ramp further has an upper surface that is accessible in the deployed position. The ramp includes lateral flanged edges extending over at least a portion of the length of the ramp, with each being movable between a first position, in which this lateral flanged edge extends vertically projecting outwards in relation to the upper surface of the ramp up to a first height, and a second position, in which the lateral flanged edge extends up to a second height that is lower than the first height.