You will need 2 strips of fabric that are twice as long as your onesie and twice as wide as you want your ruffles to be. Fold down the ends twice and iron. Fold the strips in half with the inside facing outward and iron. See picture for what this should look like.
Sew a seam down the length of the strip as shown.
Turn the strip inside out and iron. Yup, you'll be using the old iron alot for this one.
Sew a basting stitch (instructions here) down the length of the strip along the top.
Pull the thread to create a ruffle and tie it off to the length you need it to be for the onesie. Pin the ruffle onto the onesie upside down and sew in place. Iron the ruffle down and sew along the top of ruffle. See the bottom ruffle in the next picture.