Wash the eggplants and remove their stalks, along with the entire green part. Peel them lengthwise in 3-4 places and make incisions there. Add salt and let them sit for about 1/2 an hour, then squeeze them.
Clean and wash the onions and carrot, then finely chop and saute them in the oil along with the cleaned and cut into two cloves of garlic, until tender. Then add the peeled and finely chopped tomatoes, salt and pepper.
Let the mixture boil for 2-3 minutes and remove from the stove. Fill the eggplant cuts with this mixture, then place them in a suitable container. Distribute the remainder of the filling among them.
Cover the dish and leave it to saute in the oven at moderate temperature until the eggplants soften completely and they're left only in the fat. Hint: They are more delicious to eat cold.
A little background for those who do not know where the name "Imambayalda" comes from :
Long ago, before visiting his harem, the Imam would be given a proven aphrodisiac prepared from eggplants stuffed with tomatoes, onions and garlic. The dish was so delicious that it pleased all of the senses. The servants noticed that he fell into a peculiar state of heavenly bliss and began to exclaim: "Imam - bayalda, " which means "the Imam is unconscious".
It is believed that the dish got its name because of this comment. I cannot make any claims as to the absolute accuracy of the event but that's how I read it somewhere a way back and that's how I remember it.