Baby sleeping arrangements??

Our baby girl loves sleeping in her rock n play. But I have read all the risks associated with that and know some doctors say they should only sleep in them for short naps. She will sleep in a pack n play by our bed but only for at most 3 hours, usually only 2. She also squirms around a lot in it, rolling on to her side. Doesn't ever rest peacefully in it. Last night we let her sleep in the rock n play and she slept for 5 straight hours! She didn't squirm around and was peaceful all night, I feel so rested too! But I am also torn, I want her to sleep where it's the safest so I don't know what we should do!!