Preheat oven to 350?F. Clean the leeks thoroughly once sliced - use a strainer to plunge leeks into a bowl of cold water several times, refreshing the water each time.
Heat a tablespoon of butter in a large sauté pan. Add the leeks and mushrooms and season with salt. Sauté, stirring often, until the mushrooms have released their liquid and darkened then add the rest of the butter. Cover and cook over very low heat for 15 minutes, stirring occasionally. Add thyme at the end.
Meanwhile, lightly toast the bread cubes in the oven until pale golden (about 5-10 minutes) – toss in a large bowl with leek/mushroom mixture.
Whisk together eggs, milk, and cream – season this with salt and pepper. In a 9x13 baking dish, spread ½ the bread mixture, top with ½ the gruyere and repeat. Pour egg/milk mixture over everything and let soak for 15 minutes.
Top with grated parmesan and season with salt and pepper. Bake for 1 - 1 ½ hrs, until it feels set in the center (springs back slightly) and is golden brown.