Sand the legs of the end table so that they are smooth on all sides. Wipe with a tack cloth. Spray paint the legs the color you want for your ottoman. Allow the paint to dry for four hours.
Draw two diagonal lines on the table top from top left to bottom right corner and from top right to bottom left corner. Mark the center. Measure from the center along the diagonal to one corner. Divide in half and mark. Repeat for the other three corners.
Drill 1/8-inch wide holes at each mark on the table top. Drill through the table. Spray the top of the table with an adhesive spray that works with foam. Press your foam pad into the adhesive and allow to dry based on the manufacturer's recommendations.
Cut around the sides of the foam using an electric carving knife. Cut quilt batting twice the size of the table top. Place the batting flat on a worktable, and position the foam-covered table upside down and centered over the batting.
Wrap the batting to the underside of the table and staple. Start at the top center, bottom center, left center and right center. Use the same pattern working away from the center along each side. Cut the batting around the legs. Staple every inch. Trim off the excess batting.
Cut fabric large enough to wrap over the batting to the underside of the table. Place the fabric face side down on the worktable, and position the batting-covered table upside down and centered over the fabric. Use the same stapling process. Turn your fabric under along the legs for a clean line. Staple every inch. Trim off the excess fabric.
Thread a long upholstery needle. Tie the thread ends around a flat anchor button. Use a 1/2 inch flat button with four holes. Push the needle through the hole in the underside of the table, through the foam, batting and fabric. Pull the button snug to the underside of the table.
String on a stem-style button. Use a decorative button that is larger than 1/2 inch and has a stem protruding from the underside. The stem has one hole going horizontal. Take the needle back through the same hole in the foam and through a different hole in the same first button. Pull to create a tuft. Stitch back and forth three or four times, and then tie the thread to one of the buttons. Repeat for each hole.