I don't know how the table it set up on your boat (a picture would help). But I can offer some generic advice.
How about a set-screw tapped into the collar under the tabletop? Which assumes there's a collar of some sort under there. Our table has two legs but the socket for them on the underside of the table is about 2" tall. You could drill and tap a hole through the collar and then thread a thumb-screw style of set screw into it. Put the table on and then tighten the thumbscrew. Or if there's enough room then use a bolt with a knob on it. Sorta like this one:

There might not be enough metal through the collar to accommodate the threads for this. If that's the case then you'd have to see about having a nut welded onto the collar. I'd think it would be a relatively cheap job at a local welding shop.
Most of these tables fit on by friction alone. The leg is usually tapered slightly. There's usually enough for friction to make a reasonably tight fit. But if either the leg or the socket have gotten worn then there might not be enough friction. I don't know if you could 'correct' this. If there's still enough taper below where it leg seats in the socket then... maybe. You could cut off a small bit of the leg and that might let the top come down on it further. But without knowing which specific style of table you've got I'd hesitate to encourage that idea.
Me, I'd go with the set screw knob and a nut welded onto the collar. That way you'd be able to torque down the knob without worrying about it stripping out the threads in the collar. But it wouldn't hurt anything to start with a drilled and tapped hole first. With careful use it'd probably last quite a while. If you go this route be sure to buy an extra knob or two. No doubt they'd get lost way too easily...