A microscopic thermodynamically consistent approach is applied to compute electron capture (EC) rates and cross sections on nuclei in hot stellar environments. The cross section calculations are based on the Donnelly-Walecka multipole expansion method for treatment of semi-leptonic processes in nuclei. To take into account thermal effects, we express the electron capture cross section in terms of temperature-and momentum-dependent spectral functions for respective multipole chargechanging operators. The spectral functions are computed by employing the self-consistent thermal quasiparticle random-phase approximation (TQRPA) with the Skyrme effective interaction. Three different Skyrme parametrizations (SkM * , SGII and SLy4) are used to investigate thermal effects on EC for 56 Fe and 78 Ni. For 56 Fe, the impact of thermally unblocked Gamow-Teller GT+ transitions on EC is discussed and the results are compared with those from shell-model calculations. In particular, it is shown that for some temperature and density regimes the TQRPA rates exceed the shell-model rates due to violation of the Brink-Axel hypothesis within the TQRPA. For neutron-rich 78 Ni, the full momentum-dependence of multipole transition operators is considered and it is found that not only thermally unblocked allowed 1 + transitions but also thermally unblocked first-forbidden 1 − and 2 − transitions favor EC. PACS numbers: 26.50.+x, 23.40.-s 21.60.Jz, 24.10.Pa, charge, longitudinal, transverse electric, and transverse magnetic multipole operators: σ J CL (E, T ) = (1 + a cos Θ)S MJ MJ + (1 + a cos Θ − 2b sin 2 Θ)S LJ LJ + E q (1 + a cos Θ) + c 2Re{S MJ LJ } (8) and σ J T (E, T ) = (1−a cos Θ+b sin 2 Θ) S T mag J T mag J +S T el J T el J