Prolonged bed rest has long been known to have deleterious psychological effects, such as muscle atrophy and other forms of deconditioning. Besides lack of physical exercise in was shown that another important factor is that the hydrostatic pressure (caused by gravity) acts anomalously, resulting in altered distribution of body fluids. Even physical exercise in bed fails to address certain adverse effects.
Bed rest is commonly prescribed in the following cases.
For sufferers of acute pain in spine or joints; for example, in the case of backache the unloading of the corresponding spinal segment decreases the intradiscal pressure, and it would bring relief in cases such as compression of spinal nerve. The prescribed duration of bed rest vary and opinions differ. 
Bed rest is prescribed for some maternal or fetal complications of pregnancy, such as preterm labor, high blood pressure, incompetent cervix, or fetal growth problems. In the past it was a general prescription during any kind of pregnancy, now deprecated.