  We revisit neutrino oscillations in matter considering the open quantum
system framework which allows to introduce possible decoherence effects
generated by New Physics in a phenomenological manner. We assume that the
decoherence parameters $\gamma_{ij}$ may depend on the neutrino energy, as
$\gamma_{ij}=\gamma_{ij}^{0}(E/\text{GeV})^n$ $(n = 0,\pm1,\pm2) $. The case of
non-uniform matter is studied in detail, both within the adiabatic
approximation and in the more general non-adiabatic case. In particular, we
develop a consistent formalism to study the non-adiabatic case dividing the
matter profile into an arbitrary number of layers of constant densities. This
formalism is then applied to explore the sensitivity of IceCube and DeepCore to
this type of effects. Our study is the first atmospheric neutrino analysis
where a consistent treatment of the matter effects in the three-neutrino case
is performed in presence of decoherence. We show that matter effects are indeed
extremely relevant in this context. We find that IceCube is able to
considerably improve over current bounds in the solar sector ($\gamma_{21}$)
and in the atmospheric sector ($\gamma_{31}$ and $\gamma_{32}$) for $n=0,1,2$
and, in particular, by several orders of magnitude (between 3 and 9) for the
$n=1,2$ cases. For $n=0$ we find $\gamma_{32},\gamma_{31}< 4.0\cdot10^{-24}
(1.3\cdot10^{-24})$ GeV and $\gamma_{21}<1.3\cdot10^{-24} (4.1\cdot10^{-24})$
GeV, for normal (inverted) mass ordering.
