I just bought the cheapest carpet that they sold at Home Depot and some 3M spray adhesive. It didn't come out looking too pretty, but one side is acceptable, so that's the side that faces outwards when you look at it in the trunk.

I sprayed the carpet and MDF, stuck the carpet on, held it there for a minute or two, then let it set for another 10 minutes or so, and it was good to go. Since I wasn't going for perfection, I didn't use any staples (and was too cheap to buy a staple gun).