We report on the measurements of the spectra of gamma radiation generated by 855 MeV electrons in bent silicon and germanium crystals at MAMI (MAinzer MIkrotron). The crystals were 15 upmu text {m} thick along the beam direction to ensure high deflection efficiency. Their (111) crystalline planes were bent by means of a piezo-actuated mechanical holder, which allowed to remotely change the crystal curvature. In such a way it was possible to investigate the radiation emitted under planar channeling and volume reflection as a function of the curvature of the crystalline planes. We showed that, using volume reflection, intense gamma radiation can be produced – with intensity comparable to that obtained in channeling but with higher angular acceptance. We studied the trade-off between radiation intensity and angular acceptance at different values of the crystal curvature. The measurements of radiation spectra have been carried out for the first time in bent germanium crystals. In particular, the intensity of radiation in the germanium crystal is higher than in the silicon one due to the higher atomic number, which is important for the development of the X-ray and gamma radiation sources based on higher-Z deformed crystals, such as crystalline undulators.