Preheat the oven to 200°C/gas mark 6. Pour the milk and cream into a large saucepan. Add the garlic, thyme and bay leaves and bring to the boil. Remove from the heat and leave to infuse for 5 minutes.
Meanwhile, thinly slice the potatoes. Remove the bay leaves from the milk, then add the potatoes and onion. Return to the heat, bring to the boil and simmer for 3-5 minutes, stirring occasionally to prevent them sticking to each other.
When the potatoes are just tender, spoon into a buttered 2-litre ovenproof dish, layering the potatoes as you fill the dish. Scatter the cheese on top, dot with the butter and grate over a sprinkling of nutmeg. Bake for 40 minutes, until golden brown on top and bubbling.