Heat the oven to 350 degrees F.
Put the whole ears of corn into the oven (do not shuck the corn) and cook until the outside is charred and the inside feels soft when pressed, about 30 minutes. When it is cool enough to handle, pull out the silk and remove the husk. Cut the kernels off the cob and set aside.
If using frozen okra, put it into a strainer and run it under cool water for a few minutes to thaw. Remove the stems from the okra and cut them into thirds. Heat 1 tablespoon each of butter and olive oil in a skillet over medium-high heat. Cook the onion until it begins to soften, then add the corn, okra, and thyme. Cook for 1 minute and set aside.
Butter a 13-inch by 9-inch pan with 1 tablespoon butter. Bring the water to a boil in a large saucepan and add 1 teaspoon salt. Gradually sprinkle in the corn meal, whisking constantly to avoid lumps. When it is all incorporated, stir in the remaining 3 tablespoons butter and the sauteed vegetables. Reduce the heat to low, season with salt, pepper, and nutmeg, to taste, and cook for 10 minutes stirring occasionally. Pour into the buttered dish and let cool.
Slice the cooled cornmeal into squares and serve. You can also fry the cornmeal squares for a few minutes in butter or olive oil to make them crisp on the outside and soft on the inside.