I used this Bed rail with our king bed, but my son was a little older (around 5-6 months). Make sure you use the straps to secure it so there's no space between the bed and rail. If you don't use the straps it can easily move and baby can fall or get stuck.
Before that I put a body pillow under the fitted sheet so it created a barrier he couldn't roll over. Make sure the fitted sheet is really tight. I would try it while your baby is napping (and you watching) a few times to see how they do and if you need to make any adjustments or try something else. I was always a really light sleeper so any movement my son did would wake me so I was always hyper aware of his position in the bed, but it worked pretty well for us. When he was able to crawl around or I thought he could roll over the barrier we switched to the rail.