Bring a saucepan of water to the boil and add the potatoes, cook until tender, about 15 minutes.
Fry the onions in a frying pan over a low-medium heat until softened, about 8 to 10 minutes. Flake mackerel onto a plate, making sure to remove any bones.
Drain potatoes, add to onion and mix. Layer half potato and onions in deep dish (like a lasagne dish). Put mackerel over potatoes, and top with final layer of potatoes and onions. Pour pot of cream over everything and cover dish with foil.
Bake in the preheated oven for 20 minutes. Uncover and cook for another 20 minutes till browned on top.