While stress may for a short time cause a temporary loss of appetite, if a person is under stress for a prolonged period, it may result in increased appetite and weight gain. This is due to the way the human body has evolved over a period of time. Thousands of years ago, the main causes of stress were wild animals and other human beings who could cause physical harm. In such cases, stress would result in production of hormones which would help a person fight or flee the stressor.
The hormones released when a person is under stress are adrenalin (which gives instant energy), corticotrophin releasing hormone (CRH) and cortisol. Adrenalin and CRH cause a loss of appetite, but the effect usually lasts for a short time only. Cortisol replenishes the energy levels in the body after the stress has passed , by increasing the appetite and its effect remains even after the stress levels have returned to normal.
If the cause of stress results in physical activities like running, there is not much weight gain or loss. However, many causes of stress today are due to financial or personal problems, which cannot be solved by physical actions. So the increased appetite results in weight gain