It may be that the frame was originally designed to have slats span the rails, and not have the mattress (box spring) sit directly on the rails. This would have lifted the mattress up a bit, and possibly allowed it to ride over the bits that are giving you trouble.
This was one persons solution:
This is sort of a modification of what @FreeMan said, but what I would suggest is you get bolts with flat washers, where the flat washer is less than 20mm diameter so it will fit through the hole. The head of the bolt will need to be smaller than the flat washer (obviously). You will need six pieces total per mounting bolt, including the bolt itself. Put them together in this order: bolt, flat washer, flat washer, (supported structure), flat washer, lock (or split) washer, non-self locking nut. The bolt itself will need to be long enough to accommodate whatever you are going to mount to the vertical structural beams. It would look something like this when put together on the beam:
(NOTE: This is a quick PowerPoint rendering and is not to scale by any means.)
The idea here is to use the bottom half of the washers to grab the wall support. About 1/3 of the washers would be grabbing the wall support, but this will be more than enough to hold it in place. Of course, you'd want to choose the correct length of bolt so it doesn't protrude very far. The lock washer is there so you can tighten the bolt from the nut end without the need for a wrench on the other end, and so it will stay put once it's tightened. If you find that the bolt still moves without a wrench on the other end, you can put a lock washer between the bolt head and the flat washer, but I've found on blind holes like this, if you just hold the threaded end of the bolt with your fingers and use an open ended wrench to turn the nut, the bolt will tighten down without issues. If this is a permanent fixture, you could also put thread locker on the nut to ensure it stays put.
EDIT NOTE: If you are looking for added holding power, move the bolt to the left or right in the hole. This will provide the side and bottom of the hole for something the bolt/washer/nut can hold onto.
Best Answer
You can use them in place of rivets. Properly installed, you can unbolt the pieces of metal that are joined by rivnuts if you ever need to. With rivets, although you can separate the pieces of metal joined by rivets, it is more labor intensive (e.g., drilling out rivets).
They are frequently used in automotive work. For example, I used them to install aftermarket fenders to the body of my Jeep Wrangler. I also used them when I was an automotive tech to install accessories on vehicles.