I swear most of the shit people say about aging is made up (or at least that it's not so cut-and-dry as "this starts happening the microsecond you hit 40 years of age"), I've been having this type of post-sleep-ache thing happen to me for as long as I can remember, at least since I was in my early 20s. Sometimes complications of having a shitty human body happen, as long as it's not something serious/chronic you just roll with it until it goes away.
Although also I noticed that losing a considerable amount of weight did help me with reducing general acheyness.