Is there any type of wood thats better to use for bunks? Of course they will be covered in a carpet and the boat only used in fresh water! (Fiberglass boat)
I've always used treated pine and thru bolt with galvanized hardware. Stainless steel staples for carpet. The wood rots away usually before the hardware
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.
Never used galvanized fasteners with treated wood. Only use stainless steel fasteners and stainless or Inconel staples. Cypress is best, along with many other "tropical" woods that are nearly impossible to find. YELLOW pine, NOT white, is next best.
What is available in your area will determine what to use.
I went looking for what was recommended on most sites,
but here in Phoenix the best thing availabe was some kind of fir.
Treated wood can have corrosive chemicals that will destroy a Aluminum boat hull. Untreated wood is best. Wrapped with some soft plastic carpet scraps. S S U shaped staples finish up the job.
I always used 2x4's from the number yard. Never carpeted the bottom, left that area open for water to escape. Used galvanized roofing nails to hold carpet on and plated fasteners ( had access to a metal plating service)...they usually lasted about 6-7 years, then had to replace them.