Peel and cut the onions into thin slices, sautéing them gently in a little butter without browning.
Grease an ovenproof baking dish and cover the bottom with a layer of potatoes, then add half the onions and half the anchovy filets. Another layer of potatoes, then the rest of the onion and sprats. Finish with a layer of potatoes.
Flatten the surface, apply a few turns of pepper fresh from the mill and sprinkle on a little salt.
Pour the cream on until it is almost visible through the potatoes. Place a few pats of butter on top and, if desired, sprinkle with some breadcrumbs. Bake in the oven for about an hour.