Co sleeping and breastfeeding: tips for moms
I always had a child's safety rail on the outside of our bed before we moved our mattress to floor level, then put a pillow between the bed rail and baby when baby was on the outside. The pillow never hurt baby as I didn't use a fluffy one. I also usually kept baby on the outside because my husband wasn't always aware, nor did he sleep in the same sleep cycle and I didn't want him rolling on baby.
I prefer our mattress to be on the floor now, it's just easier.
Co sleeping and breastfeeding worked well for me. I felt I was generally able to sleep ok and could fall back to sleep once I switched baby to the other side. I have no regrets. My babies who co-slept seemed to help my milk supply compared to the ones I did not sleep with all the time (my first two).