A month or two ago I stayed in the sun a little too long and got a sun burn and paid for it for about two weeks. At first my body ached all over and for the rest of the time my sleep got disturbed, which had been normalized. I started waking up in the middle of the night again for a couple of hours with trouble going back to sleep.
It will pass. I doubt you're back at square one. But yeah, I would say that 5 hours is a little much. I spend about 1-1.5 hours in the late afternnon sun every day and that feels good to me, but I built up to that as I've been in the sun every day all winter and have a serious base tan.