Low-mass M dwarf stars, T Tauri stars, as well as planets such as the Earth and Jupiter are permeated by large-scale magnetic fields generated by the convection-driven dynamo operating in their convection zones. These magnetic fields are often characterized by a significant time variability, most prominently expressed by the inversions of their polarity, denoted as reversals, whose mechanism has not been completely understood. This work aims to gain some insights into the mechanism that generates these reversals. With this purpose, a simplified nonlinear model is developed to investigate the role played in polarity reversals by the convective heat transfer occurring in stellar and planetary convection zones. A model result is the enhancement of the global heat transport before polarity reversals, showing the crucial role that heat transport might play in their occurrence. This role is elucidated by considering that a reversal has a greater than 70% probability of occurring during a burst of convective heat transport. This high probability has been found in 94 out of 101 numerical simulations obtained by changing characteristic model parameters. Moreover, the causal relationship between the convective heat flux growth and the magnetic field variations is highlighted by the temporal antecedence of the former relative to the latter and by convergent cross mapping, namely a statistical test for detecting causality. It would thus be expected that higher levels of temporal variability in the planetary and stellar magnetic fields may be correlated to a higher heat transfer efficiency achieved in the interior of these celestial bodies.