Measure the width and length of your bed on the inside of the waterbed frame, as well as the depth of the opening. Add 6 inches to the depth so the memory foam will cushion the wooden sides when you are sitting on the side of the bed. (This is assuming you have already removed the waterbed mattress.)
Purchase or order firm foam that will act as the support for the softer memory foam. JC Penney carries a 5-inch foam that works great for this. Use two layers or enough to fill a 10-inch space (see Resources). If your bed is not a standard size, get the next size up, since you can trim the firm foam to fit.
Check out the memory foam from Overstock.com (see Resources) or any other retailer that carries memory foam. There are a lot of sources for the thin foam, but look for the memory foam that is at least 4 inches thick and solid. Purchase two layers, if necessary, to fill in the area measured for the depth.
Lay the layers of foam on the bed and see if they fit into the mattress area. Trim them with a serrated knife or utility knife to fit. If you purchased them through the mail, you may wish to wait for a few hours until they have had a chance to uncurl and lay flat.
Place the trimmed foam into the bed, the support foam first and then the memory foam. If you have a mattress cover, this would be the time to fit the foam into it, otherwise use ordinary sheets tucked down over the foam to make your bed as usual. Keep a window open for the first 24 hours to allow the new foam smell to dissipate.