I have used treated pine with stainless or galvanized carriage bolts, nuts, washers, and lock washers, monel staples, and bunk carpet. I used 3M #77 spray adhesive to help hold the carpet to the bunks. You might use a 3/4 or 1 inch wood bit to counterbore (make a recessed area) for the bolt heads. My experience with composite lumber such as decking is that it is more flexible than traditional lumber and would not provide the support needed.