Place the scallops in a buttered 1½ quart casserole dish.
Sauté the mushrooms in 1 tablespoon of butter along with the fresh thyme, pinch of salt, and pepper.
Add the white wine, and continue to cook until all the liquid is evaporated. Set aside to cool.
Remove the thyme stems, and then spread them over the scallops.
Heat 4 tablespoons of butter in a heavy-bottomed saucepan until melted and bubbly.
Add the flour and salt and cook, constantly stirring, for two minutes.
Add the milk all at once and stir until the mixture comes to a boil. Reduce the heat to medium-low and simmer until thickened.
Add the Old Bay seasoning.
Stir in the cheese a little at a time off the heat. Taste and adjust seasonings as necessary.
Pour the sauce over the scallops and mushrooms.
Cover with strips of bacon, and bake at 350°F for about thirty minutes.
Let cool slightly before serving.