You need to push the mattress up against your mattress as tight as it will go. Then take the foam or whatever you've bought to fill the gap, and put it in the crack between the crib mattress and the crib. I covered my foam with matching material, for aesthetic reasons. I also bungee corded the crib frame to my bed frame (I have a big wooden sleigh bed, but we managed to make it work) for extra security.
This is the link I like to share, because this family shows it so well.
Enjoy your side car! We did it for many many months, and it worked out so well for us.