If you are dead keen on the moving top idea, make the carcass ends slope the other way. Incorporate the leg splay angle to be the same and position the legs right at the end. Make the table top with substantial overhang at both ends then make the top slide so the far end lines up with the carcass end. This will give the most stability. The substantial overhang restores the look of the table and keeps the splayed legs under the table top edge.
If the top has to raise and move the maximum splayed legs will give the most stability along with a counter weight.