To stop the mattress from sliding you need to have friction between the mattress and bed frame. Lack of adequate…