Attach the two headboards to either end of the bedframe. These will make the sides of the couch. If you think the headboards are too high, you can saw down the legs to make them lower. Alternatively, you could use two footboards instead of two headboards.
Place thick bolsters along one side of the mattress to serve as a backrest, if desired. You can make these out of foam blocks or purchase them ready made. Bolsters will make the couch more comfortable to sit on in the usual way, because a twin mattress is wider than a couch seat. The bolsters take up some of the mattress width.
Cover both the mattress and bolsters with sturdy, comfortable fabric. You can either sew a cover to fit over it or simply drape a bedspread or blanket over the day bed. If you are using bolsters, choose a non-slippery fabric.
Add throw pillows at both sides for a finished look and add other pillows to place against the back bolster for greater comfort.