We study a natural contact instanton (CI) equation on gauge fields over 7-dimensional Sasakian manifolds, which is closely related both to the transverse Hermitian Yang-Mills (tHYM) condition and the G_2-instanton equation. We obtain, by Fredholm theory, a finite-dimensional local model for the moduli space of irreducible solutions. We derive cohomological conditions for smoothness, and we express its dimension in terms of the index of a transverse elliptic operator. Finally we show that the moduli space of selfdual contact instantons (ASDI) is Kahler, in the Sasakian case. As an instance of concrete interest, we specialise to transversely holomorphic Sasakian bundles over contact Calabi-Yau 7-manifolds, and we show that, in this context, the notions of contact instanton, integrable G_2-instanton and HYM connection coincide.