  Generation of magnetic fields during inflation is a promising mechanism for
the origin of the observed large scale magnetic fields in the universe. Among
several attempts, a popular model is one where the inflaton and the
electromagnetic field are coupled through a coupling function $f$ leading to a
term in the Lagrangian density of the form, $f^2 F^{\mu \nu} F_{\mu\nu}$. A
number of potential difficulties with such models have been raised in the
literature. In our earlier work, we have suggested viable models of
inflationary magnetogenesis which avoid these problems and at the same time can
lead to either nonhelical or helical magnetic fields of astrophysical interest.
Our models require a low energy scale for inflation and reheating (reheating
temperature, $T_R < 10^4$ GeV) and generate a blue spectrum of electromagnetic
(EM) field which peaks around the horizon scale of reheating. We show here that
the anisotropic stress associated with these EM fields naturally source the
production of a stochastic background of Gravitational waves (GW) with
frequencies in the range of tens of nano Hertz to milli Hertz. These two
extremes of the range can be probed respectively by pulsar timing arrays (PTA)
experiments and the upcoming Laser Interferometric Space Array (LISA). The peak
value of the GW spectrum energy represented by $d \Omega_{GW}/d \ln k$ is $
10^{-6} $ for the models which lead to nonhelical primordial fields and $2
\times 10^{-6} $ for the helical case for $T_R=100$ GeV. In this case the
spectrum peaks at a frequency $30 \mu$Hz for non helical case and at $40 \mu$Hz
for helical case. These values are obtained when the ratio of EM energy density
to the cosmological density at reheating $\epsilon \sim 1$ and decrease
approximately as $\epsilon^2$ for smaller values.
