This might not be good enough, but you might find that you can use something like a.. damn, forgot the name...
There's a sort of strap you can attach to a pedal (if it's a cage sort, not a flat rubber type) and forms a sort of clip - it goes diagonally on the pedal so you twist your foot to extricate, like in clipless. Being a strap, I assume it would just fold against the pedal when folded. Bit of a guess though..
Powerstrap? Powergrip? Something like that...
Or you could go for removable pedals, if you really need the space... But as Andy says, you often don't need to fold the pedals anyway.