Heat oven to 400° F.
Coat a 3 1/2-quart casserole with cooking spray. In a medium bowl, whisk together the eggs, buttermilk, thyme, salt, and pepper; set aside.
Arrange a layer of slightly overlapping potatoes in the casserole. Cover with a layer of apples and sprinkle with a third of each cheese. Pour a third of the egg mixture on top. Make 2 more layers.
Bake, covered, 1 hour, 15 minutes. Remove cover and bake another 15 minutes or until the potatoes are tender. Remove from oven. Serve warm or at room temperature.