I don't use a traditional beanbag for my newborn sessions, I've always used the bed in my studio because I never had the space for a posing beanbag. (My studio doubles as a guest room so we can't get rid of the bed. Plus I use it for my maternity portraits.)
First you will have to measure how tall your bed is from the floor to top of the mattress. Mine was 27" INCLUDING the joints. So my actual cut length of pvc was about 25 inches, allowing for 1 inch for each joint. I bought three 8ft lengths of pvc and that was good for my bed.
My measurements are just a guideline, as not all beds are the same height. For the joints, you will need 2 "T" joints and 6 Corner joints. You can also get pvc glue if you want your joints to be permanent. I needed mine to be easy to take apart and store under the bed so I didn't glue mine.
****BLOG UPDATE****
Since I built my stand, I also have made a custom sized beanbag to sit on the bed.
Beanbag dimensions-
48 inches by 48 inches. I just used scrap fabric I had kicking around. (finished product ends up being a bit narrower once filling is in)