Measure from the top rail to the floor and record the measurement.
Add 8 inches to the measurement for extra fabric to wrap around the top rail.
Add 2 inches for seam allowance.
Add 4 to 6 inches if you would like the fabric to pool on the floor.
Trim the width of the fabric to suit your tastes. Most widths are 36 inches, which would make a panel 34 inches wide with 1-inch seams.
Extend the tape measure from the floor up over the top rail to the rail on the opposite side, and down to the floor.
Add 2 inches for a seam allowance.
Add 8 to 12 inches if you would like the fabric to pool on either side of the bed.