Preheat the oven to 375°F (190°C). Cut the eggplants in half lengthwise and sprinkle with salt. Let them sit for 20 minutes to remove excess moisture, then pat dry.
In a skillet, heat olive oil over medium heat. Sauté onions and garlic until soft. Add tomatoes and cook until the mixture thickens.
Make a slit in each eggplant and fill with the tomato mixture. Place them in a baking dish, drizzle with olive oil, and cover with foil.
Bake for 45 minutes until the eggplants are tender. Let them rest before serving.