I installed a 5'10" folding bed in my Pajero a few weeks back.
Requirement:
1. To have a flat bed to enable atleast 02 adults sleep comfortably wherever camping was required.
2. To free up space for storage area, which the presence of 3rd row seats was hampering.
Items used and cost:
1. 19mm ply of 6' x 4'. Appx Rs.2700/-
2. Carpet. Appx Rs. 900/-
3. Welded frame with screwing mechanism that would fit onto the same setup occupied earlier by the 3rd row seats. Used the same screws to fix the frame. Appx Rs. 500/-
4. Screws to fix the ply to the frame. Hinges to enable folding / unfolding the bed in 3 stages. Appx Rs. 200/-
5. Folding legs obtained from a furniture hardware store with an locking / unlocking mechanism. Appx Rs. 450/-
6. 02 magnet mechanisms (ones used in cabinet doors) to keep the legs in place while unfolding and from vibrating. Appx Rs. 40/-
Total Expenditure Appx Rs. 5000/-
Pictures of deployment in sequence are as follows:
Folded position of the bed.

Lay down the 2nd row seat. Also acts as a support for the 2nd fold of the bed.

Unfold 2nd stage of bed onto folded 2nd row seat.

Unfold 3rd stage of bed and deploy legs.

Fully deployed bed as viewed from rear

The bed uncoils as below
Final adjustments included tightening of the frame mounting screws to eliminate minor squeaks.
Already used the bed once during a power cut, and it proved to be a life/moneysaver!
The carpet fixing cost me abt Rs.300/- of adhesive!
Cutting the ply as per the fold contours of the vehicle and to facilitate the deployment of the bed is vital.
Hope this helped in a way. Will be glad to clarify any issues/doubts from fellow bhpians.