Reverse the action you performed when you converted the bi-fold futon from a couch to a bed. Futons generally have two different styles for switching between the sofa position and the bed position -- either pulling the seat deck forward and then pushing the back deck down or unfastening the back deck first and pushing it down before positioning the seat deck.
Fasten the futon decks into place with the back deck positioned vertically and the seat deck perpendicular to the back deck.
Refold the bi-fold futon mattress in place over the decks of the futon frame. The bi-fold mattress folds in half lengthwise to complete the transformation from bed to couch.