Prepare the mashed potato or make up the instant potato as instructed on the packet. Peel, core and slice the apple. Peel and chop the onion. Slice the fresh tomatoes, or drain and slice the tinned tomatoes.
Place the apple slices in the base of a greased, ovenproof dish. Sprinkle with the sugar. If using sausages, slit the sausage skins to remove the sausage meat and dispose of the skins. Mix the chopped onion with the sausage meat or skinned sausages and spread the sausage mixture over the apples.
Spoon the mashed potato round the dish to make a border or nest for the sausage. Cover the sausage with the tomatoes. Dot the potato with the butter, and bake in an oven (400F/200C/Gas Mark 6) for 30 minutes, until the sausage is cooked and the potato is crisp and golden brown on top.