Mg2X (X = Si, Ge) compounds are promising thermoelectric materials for middle temperature applications due to good thermoelectric properties, nontoxicity, and abundantly available constituent elements. So far, these materials used in applications have all been in bulk form. Herein we report a full theory of thermoelectric transport properties of 3D bulk and 2D quantum well systems. The main aim of this present work is to show the effect of quantum confinement on the enhancement of the thermoelectric figure of merit theoretically. Results are given for n-type Mg2Si0.5Ge0.5 solid solutions and n-type Mg2Si/Mg2Ge/Mg2Si quantum well systems where the values of well widths are taken as 10 nm, 15 nm, and 20 nm, respectively. The n-type doping is made by using Sb- and La-elements as dopants. Experimental results for solid solutions are included to provide demonstration of proof of principle for the theoretical model applied for 3D bulk structures. The maximum thermoelectric figure of merits of LaxMg2-xSi0.49Ge0.5Sb0.01 solid solutions are obtained to be 0.64 and 0.56 at 800K for x = 0 and x = 0.01 sample, respectively. While, at the same temperature, due to the relatively low phonon thermal conductivity the state-of-the-art ZT values of 2.41 and 2.26 have been attained in the Mg2Si/Mg2Ge/Mg2Si quantum well samples with 0.01 wt. % Sb-doped and 0.01 wt. % Sb- and 0.01 wt. % La-doped, respectively. Published by AIP Publishing.