The mattress will probably stop sliding if you put a sheet of rubber between the mattress and the bed frame. You can buy these sheets intended to be used for rugs on hardwood floors.
Another interesting tip I found on this page is to put lines of hot glue or silicone caulk on the surface. It's intended for carpets, but it would likely work in your case if the lines are big and thick enough. Hot glue is more grippy than silicone, but usually more expensive.
I suspect some of the answers here (regarding rugs) would help:
How to make slippery rug stay in place