In chronic diseases such as cancer and HIV wasting syndrome, patients may experience significant loss of muscle and fat in spite of adequate calorie intake. The problem is not one of malnutrition, but accelerated catabolism either in the diseased tissue, or in normal tissue stimulated by cytokines released by the disease process, especially tumor necrosis factor-alpha, umor necrosis factor-α, IL-1b, and IL-6. The ATP-ubiquitin-protease pathway plays a role as well. 
To treat it, one primarily needs to treat the underlying disease. Additional calories may not help. A number of drugs, such has corticosteroids and cannabinoids, improve, respectively, a feeling of well-being or appetite, but do not benefit the wasting tissue. Progesterone has shown promise.
On a more experimental level, ghrelin helps in experimental situations.
- "Cachexia", Merck Manual for Medical Professionals