To offer more support and more comfort while using an extension ,
I would use an inflatable mattress on top off the jack-knife sofa in conjunction with the folding platform seen in the below post .
That way the added support can be free standing and possibly NOT need to be attached.
You can make the support platform ( thin plywood ) with a hinge so it can all fold up for storage in conjunction with the folding legs.
bench legsidea was found here
http://www.popupportal.com/index.php?topic=82453.0