  We analyze the dynamics of inflationary models with a coupling of the
inflaton $\phi$ to gauge fields of the form $\phi F \tilde{F}/f$, as in the
case of axions. It is known that this leads to an instability, with exponential
amplification of gauge fields, controlled by the parameter $\xi=
\dot{\phi}/(2fH)$, which can strongly affect the generation of cosmological
perturbations and even the background. We show that scattering rates involving
gauge fields can become larger than the expansion rate $H$, due to the very
large occupation numbers, and create a thermal bath of particles of temperature
$T$ during inflation. In the thermal regime, energy is transferred to smaller
scales, radically modifying the predictions of this scenario. We thus argue
that previous constraints on $\xi$ are alleviated. If the gauge fields have
Standard Model interactions, which naturally provides reheating, they
thermalize already at $\xi\gtrsim2.9$, before perturbativity constraints and
also before backreaction takes place. In absence of SM interactions (i.e. for a
dark photon), we find that gauge fields and inflaton perturbations thermalize
if $\xi\gtrsim3.4$; however, observations require $\xi\gtrsim6$, which is above
the perturbativity and backreaction bounds and so a dedicated study is
required. After thermalization, though, the system should evolve non-trivially
due to the competition between the instability and the gauge field thermal
mass. If the thermal mass and the instabilities equilibrate, we expect an
equilibrium temperature of $T_{eq} \simeq \xi H/\bar{g}$ where $\bar{g}$ is the
effective gauge coupling. Finally, we estimate the spectrum of perturbations if
$\phi$ is thermal and find that the tensor to scalar ratio is suppressed by
$H/(2T)$, if tensors do not thermalize.
