In the last few years the Fermi-LAT instrument has detected GeV gamma-ray emission from several novae. Such GeV emission can be interpreted in terms of inverse Compton emission from electrons accelerated in the shock or in terms of emission from hadrons accelerated in the same conditions. The latter might reach much higher energies and could produce a second component in the gamma-ray spectrum at TeV energies. We perform follow-up observations of selected novae and dwarf novae in search of the second component in TeV energy gamma rays. This can shed light on the acceleration process of leptons and hadrons in nova explosions. We have performed observations with the MAGIC telescopes of 3 sources, a symbiotic nova YY Her, a dwarf nova ASASSN-13ax and a classical nova V339 Del, shortly after their outbursts. We did not detect TeV gamma-ray emission from any of the objects observed. The TeV upper limits from MAGIC observations and the GeV detection by Fermi constrain the acceleration parameters for electrons and hadrons.