In this work, we report on a systematic first-principles study of the structural, electronic, vibrational and thermodynamic properties of the cubic Fe2NiAl and tetragonally distorted Co2NiAl full Heusler compounds. We discuss systematically the competition between the inverse Heusler structure and a Tp-type layered atomic ordering formed by the alternating planes of (Fe,Co) and Ni atoms in terms of the electronic and vibrational density of states. Such an arrangement is predicted to be the ground state of Fe2NiAl. For Co2NiAl, layered ordering has slightly higher energy in comparison with the inverse one, however, we show that it might be stabilized at rather low temperatures. Due to the broken symmetry, layered Tp-Fe2NiAl possesses a large MAE of the same order as tetrataenite FeNi - even in a phase with cubic lattice parameters, which makes a Tp-type layered order an interesting feature for rare-earth free permanent magnets in Heusler-type compounds.