One of the main reasons that your body aches when you are sick, like with a cold, is that your body's immune system is producing plenty of antibodies in addition to the effects of all those viruses replicating in your cells killing them and leaving the area ‘raw’ and exposed.
These antibodies also promote the release of histamine which typically dilates (widens) blood vessel near an infection, this allows for more of the body's defences to get at the infection. There are histamine receptors in blood vessels that cause them to dilate.
As these chemicals are released into your blood stream they can end up in your muscles or other body parts. Various body systems can have receptors to histamine that can then trigger a pain receptor.
In addition to histamine there are biochemicals called cytokines that are released when the body has an immune response that are also known to trigger a biochemical pathway that can affect pain receptors.
Histamine and cytokines releases can change the perception of pain receptors in the body making them more sensitive to pain factors.
There are other factors that come into play also such as biochemicals called interleukins that relate to fever conditions and temperature increases, all of which can affect pain receptors in different ways, for example heat receptors.
The overall perception of pains and aches over the whole body can vary from person to person and there may be other combinations of psychological, physiological or even nutritional factors that may influence this.
A recent hypothesis suggests also that having symptoms of sickness is an evolutionary mechanism to minimise sickness spreading within a group by making a person less mobile or motivated.
Note to reddit TIL:
The original/older version of this page referred to muscle contraction and lactic acid as being a reason for muscle aches, this is not a major reason for such pain in a flu like situation. That information has been removed and the page updated since.
- Role of histamine H(1) receptor in pain perception: a study of the receptor gene knockout mice.
- Cytokines, Inflammation and Pain (US National Library of Medicine )
- Molecular Pathways in Virus-Induced Cytokine Production (Microbiol Mol Biol Rev. 2001 March; 65(1): 131–150.)
- Symptom pathogenesis during acute influenza: Interleukin-6 and Other cytokine responses
- Types of pain receptors (PDF, technical notes, Texas A&M Univeristy, S.E Reichman)