To stop a mattress from sliding on a bed frame, add friction between the two surfaces. The fastest fixes are a non-slip rug gripper or mattress pad laid over the slats, self-adhesive hook-and-loop strips at the head and foot, or a rubber mat between the mattress and base. If the whole frame shifts, fit anti-slip …