It is commonly understood that as the Universe expands with scale factor $a$ the energy of a photon drops like $1/a$ whereas the energy of a particle at rest is constant.
In the analysis below I attempt to show that these assumptions are incorrect. I show that as the Universe expands the energy of a photon is constant whereas the energy of a particle at rest increases like $a$.
Thus the cosmological redshift is not caused by photon wavelength expanding but rather by absorber atoms acquiring a larger energy than the emitting atoms.
Am I correct?
Update
I think I'm wrong. Thanks to @AndrewSteane I realize that I am calculating the energy component of the $4$-momentum which will be coordinate dependent and therefore unphysical by itself.
Lagrangian mechanics of a particle moving in curved spacetime
The action for a massive point particle moving in curved spacetime is proportional to the integral of the proper time $\tau$ along its worldline: $$S=\int L[\tau]\ d\tau=-m\int d\tau.\tag{1}$$ An interval of proper time $d\tau$ is given by $$d\tau^2=-dx^{\nu}dx^\mu g_{\mu\nu}.\tag{2}$$ We can combine Eqn.$(1)$ and Eqn.$(2)$ using the arbitrary parameter $\lambda$ to obtain $$S=\int L[\lambda,x^\mu(\lambda),\dot{x}^\mu(\lambda)]=-m\int d\lambda\Big(-\frac{dx^\mu}{d\lambda}\frac{dx^\nu}{d\lambda}g_{\mu\nu}\Big)^{1/2}.\tag{3}$$ Now Eqn.$(3)$ is only valid for massive particles. There is an equivalent form of Eqn.$(3)$ that is valid for massless particles as well, which includes the extra field $e(\lambda)$, given by $$S=\frac{1}{2}\int d\lambda \Big(e^{-1}(\lambda)\frac{dx^\mu}{d\lambda}\frac{dx^\mu}{d\lambda}g_{\mu\nu}-e(\lambda)m^2\Big).\tag{4}$$ The field $e(\lambda)$ is completely fixed by its equation of motion, obtained by setting $\partial L/\partial e=0$, to give $$\frac{dx^\mu}{d\lambda}\frac{dx^\nu}{d\lambda}g_{\mu\nu}+e^2(\lambda)m^2=0.\tag{5}$$ If you substitute the equation of motion Eqn.$(5)$ into the generalized action Eqn$(4)$ you obtain the original action Eqn.$(3)$.
Now in Lagrangian mechanics the energy can be derived from the Lagrangian using the expression $$E(\lambda)=-\frac{\partial L}{\partial (d x^0/d\lambda)}.\tag{6}$$ The corresponding Euler-Lagrange equation is given by $$\frac{d}{d\lambda}\Big(\frac{\partial L}{\partial(d x^0/d\lambda)}\Big)=\frac{\partial L}{\partial x^0}.\tag{7}$$
Particle moving in a FRW universe
I now wish to describe an general expanding FRW universe using conformal time $\eta$ and a homogeneous, isotropic $3$-space with metric $\gamma_{ij}$ and co-ordinates $(u^1,u^2,u^3)$ so that we have $$g_{\mu\nu}=a^2(\eta)\ \mathrm{diag}[-1,\gamma_{11},\gamma_{22},\gamma_{33}].\tag{8}$$ The interval of proper time $d\tau$ is obtained from Eqn.$(2)$ and Eqn.$(8)$ such that $$d\tau^2=a^2[d\eta]^2-a^2\gamma_{11}[du^1]^2-a^2\gamma_{22}[du^2]^2-a^2\gamma_{33}[du^3]^2.\tag{9}$$ Substituting the FRW metric in Eqn.$(8)$ into the generalized particle action Eqn.$(4)$ we obtain the Lagrangian given by $$L=\frac{1}{2}e^{-1}(\lambda)a^2(\eta)\Big(-\Big[\frac{d\eta}{d\lambda}\Big]^2+\gamma_{11}\Big[\frac{d u^1}{d\lambda}\Big]^2+\gamma_{22}\Big[\frac{d u^2}{d\lambda}\Big]^2+\gamma_{33}\Big[\frac{d u^3}{d\lambda}\Big]^2\Big).\tag{10}$$ By combining Eqn.$(6)$ and Eqn.$(7)$, and using the proper time interval $d\tau$ from Eqn.$(9)$, we find that the particle energy $E$ obeys the equation \begin{eqnarray} \frac{dE}{d\lambda}&=&-\frac{\partial L}{\partial \eta}\tag{11}\\ &=& e^{-1}(\lambda)a(\eta)\frac{da(\eta)}{d\eta}\Big(\Big[\frac{d\eta}{d\lambda}\Big]^2-\gamma_{11}\Big[\frac{d u^1}{d\lambda}\Big]^2-\gamma_{22}\Big[\frac{d u^2}{d\lambda}\Big]^2-\gamma_{33}\Big[\frac{d u^3}{d\lambda}\Big]^2\Big)\tag{12}\\ &=&e^{-1}(\lambda)\frac{da/d\eta}{a}\Big[\frac{d\tau}{d\lambda}\Big]^2.\tag{13} \end{eqnarray}
Massless particle
A massless particle travels along a worldline such that $d\tau=0$. Therefore Eqn.$(13)$ implies that $dE/d\lambda=0$ and so the energy $E$ of a massless particle is constant.
Massive particle at rest
We consider a massive particle at rest ($du^1=du^2=du^3=0$) so that Eqn.$(9)$ implies $$\frac{d\tau}{d\eta}=a(\eta).\tag{14}$$ Furthermore, by using the definition of the proper time interval in Eqn.$(2)$, the equation of motion Eqn.$(5)$ can be written as $$\frac{d\tau}{d\lambda}=e(\lambda)m.\tag{15}$$ By substituting for $e^{-1}$ from Eqn.$(15)$ into Eqn.$(13)$ to get Eqn.$(17)$ and substituting Eqn.$(14)$ into Eqn.$(18)$ we get \begin{eqnarray} \frac{dE}{d\eta} &=& \frac{dE}{d\lambda}\frac{d\lambda}{d\eta}\tag{16}\\ &=& m\frac{d\lambda}{d\tau}\frac{da}{d\eta}\frac{1}{a}\frac{d\tau}{d\lambda}\frac{d\tau}{d\lambda}\frac{d\lambda}{d\eta}\tag{17}\\ &=& m \frac{da}{d\eta}\frac{1}{a}\frac{d\tau}{d\eta}\tag{18}\\ &=& m \frac{da}{d\eta}.\tag{19} \end{eqnarray} By integrating Eqn.$(19)$ we find that for massive particles at rest the energy $E$ is given by $$E=m\ a(\eta).\tag{20}$$