Preheat the oven to 350°F (175°C).
Grease a baking dish (about 9×13 inches or similar size).
Prepare the phyllo: Take one sheet at a time, brush lightly with melted butter or oil, gently scrunch it into loose folds, and place it upright in the dish.
Add the fillings: Tuck slices of ham, cheese, and tomato between and around the phyllo folds as you go. Repeat until the dish is full.
Make the custard: In a bowl, whisk together the eggs, sour cream, milk, salt, and pepper.
Pour the mixture evenly over the assembled bake, letting it soak into the layers.
Bake for 35–40 minutes or until golden brown on top and set in the center.
Let cool slightly, slice, and serve warm. Garnish with green onions or chives if desired.