If cosmic inflation was driven by an electrically neutral scalar field stable on cosmological time scales, the field necessarily constitutes all or part of dark matter (DM). We study this possibility in a scenario where the inflaton field $s$ resides in a hidden sector, which is coupled to the Standard Model sector through the Higgs portal $lambda_{hs} s^2mathcal{H}^daggermathcal{H}$ and non-minimally to gravity via $xi_s s^2 R$. We study scenarios where the field $s$ first drives inflation, then reheats the Universe, and later constitutes all DM. We consider two benchmark scenarios where the DM abundance is generated either by production during reheating or via non-thermal freeze-in. In both cases, we take into account all production channels relevant for DM in the mass range from keV to PeV scale. On the inflationary side, we compare the dynamics and the relevant observables in two different but well-motivated theories of gravity (metric and Palatini), discuss multifield effects in case both fields ($s$ and $h$) were dynamical during inflation, and take into account the non-perturbative nature of particle production during reheating. We find that, depending on the initial conditions for inflation, couplings and the DM mass, the scenario works well especially for large DM masses, $10^2$ GeV$lesssim m_{s}lesssim 10^6$ GeV, although there are also small observationally allowed windows at the keV and MeV scales. We discuss how the model can be tested through astrophysical observations.