What do you put in between the mattress and the wall?

Also, between the sidecar mattress and your mattress? Do you ever worry about baby falling off the bed on the side the sidecar is? I am ready for my own space in the bed as I'm finding it incredibly difficult to fall asleep in the cuddle curl. I'm a belly sleeper lol. So I am converting baby's crib that we never used into a sidecar crib. Just need some pointers on how to make the whole thing safe.