The two-dimensional Darcy–Boussinesq equations, governing natural convection heat transfer in a saturated porous medium, are solved in generalised orthogonal coordinates, using high-order compact finites differences on a very fine grid. The mesh is generated numerically using the orthogonal trajectory method. The code is thoroughly validated against results reported in the literature for concentric and eccentric cylinders, obtained using different numerical techniques. The code is applied to horizontal eccentric elliptic annuli containing saturated porous media. The judicious stretching of one of the annular walls in the horizontal direction reduces the heat losses with respect to a concentric cylindrical annulus with the same amount of insulating material. The savings in heat transfer can be further improved if the elliptic annular shape is made eccentric. Previous studies show that, under certain conditions, eccentric cylinders may lead to a more effective insulation than concentric ones. The results presented here provide an alternative approach to optimising the heat transfer rate by a proper choice of the annular shape. The energy savings are of the order of 10%.