No, bed rails don’t work with all mattresses. Here’s how to make sure your mattress will work. First, measure the height of your mattress—just the mattress itself, not the height from the floor to the mattress—and look for a bed rail that works with that measurement. We included the recommended mattress heights of all our top picks for easy comparison. Next, make sure the mattress isn’t too soft. If you push down on the edge of the mattress, it shouldn’t depress more than 2 inches. If the mattress is too soft, body parts could slide between the mattress and the bed rail and get stuck after relieving the pressure. Finally, if the mattress or bed frame is adjustable—meaning it can raise the upper body—you’ll need to get a special bed rail that remains stable at an angle and doesn’t interfere with the mattress’s motion.