We have developed and explored the use of a new Automatic Tuning Matching Cycler (ATMC) in situ NMR probe system to track the formation of intermediate phases and investigate electrolyte decomposition during electrochemical cycling of Li- and Na-ion batteries (LIBs and NIBs). The new approach addresses many of the issues arising during in situ NMR, e.g., significantly different shifts of the multi-component samples, changing sample conditions (such as the magnetic susceptibility and conductivity) during cycling, signal broadening due to paramagnetism as well as interferences between the NMR and external cycler circuit that might impair the experiments. We provide practical insight into how to conduct ATMC in situ NMR experiments and discuss applications of the methodology to LiFePO4 (LFP) and Na3V2(PO4)2F3 cathodes as well as Na metal anodes. Automatic frequency sweep (7)Li in situ NMR reveals significant changes of the strongly paramagnetic broadened LFP line shape in agreement with the structural changes due to delithiation. Additionally, (31)P in situ NMR shows a full separation of the electrolyte and cathode NMR signals and is a key feature for a deeper understanding of the processes occurring during charge/discharge on the local atomic scale of NMR. (31)P in situ NMR with "on-the-fly" re-calibrated, varying carrier frequencies on Na3V2(PO4)2F3 as a cathode in a NIB enabled the detection of different P signals within a huge frequency range of 4000 ppm. The experiments show a significant shift and changes in the number as well as intensities of (31)P signals during desodiation/sodiation of the cathode. The in situ experiments reveal changes of local P environments that in part have not been seen in ex situ NMR investigations. Furthermore, we applied ATMC (23)Na in situ NMR on symmetrical Na-Na cells during galvanostatic plating. An automatic adjustment of the NMR carrier frequency during the in situ experiment ensured on-resonance conditions for the Na metal and electrolyte peak, respectively. Thus, interleaved measurements with different optimal NMR set-ups for the metal and electrolyte, respectively, became possible. This allowed the formation of different Na metal species as well as a quantification of electrolyte consumption during the electrochemical experiment to be monitored. The new approach is likely to benefit a further understanding of Na-ion battery chemistries.