At that age, my husband and I were living with his parents and he slept in a different room than me and our daughter, I would just tuck big pillows under the cover on one side of the bed really tight to create a barrier on one side. She did actually fall off one time only and it was because she had crawled in her sleep to the end of the bed and rolled off that way (thankfully was absolutely fine, just shook up) so I later also started putting extra pillows tucked un at the end of the bed too. You can also buy a bed rail (search amazon there are tons of different kinds even this lol).