Whether your mattress is on the floor or on a bed frame, there are measures you can take to keep it from sliding or rolling around. Try placing a non-slip mattress pad underneath the mattress, for example. You can also try vacuuming the floor to get rid of dust or other particles that may be causing the mattress to slide.