We have a free standing table for our U-shaped dinette. It was not really stable when we got it, with two folding legs. I added a third folding leg, and it is perfect. It is not as heavy duty as I would like, but it has survived 12 seasons of camping!
I just got the hinge and folding brace from my local hardware store. I had a piece of 1x3 maple to use as the leg. It wouldn't be too hard to make four folding legs out of wood if you wanted to do that. Most of the "legs" I've seen for sale specifically for folding tables are pretty lightweight and crappy.
The other "leg" I added was a simple 4x4 support to go under the unsupported edge of the table when it is lowered to make the bed. I am not a light person, so I was always paranoid about breaking the table when I got on the bed. That is a long, unsupported edge for that particle board to hold me up! I just cut a 4x4 to fit under there, and I don't have to worry about it.