Preheat the oven to 180 degrees C. Grease a small to medium baking dish.
In a large nonstick frypan, cook the mushrooms over medium-high heat, stirring often, for 5 minutes, or until dry; transfer the mushrooms to a plate.
Melt the butter in the frypan, add the onions and cook over high heat for 12 minutes, or until nicely browned, stirring frequently during the last few minutes.
Put the matzo meal in a large bowl and add the onions, mushrooms, carrots and celery. Toss well with the salt and pepper. Stir in the eggs and 3/4 cup of water. Spread the mixture in the prepared baking dish, cover tightly with aluminum foil and bake for 20 minutes. Remove the foil and bake about 20 minutes longer, until the top begins to crisp.