A rocking assembly for a bed has a mattress frame, a base frame and a rocking driver. The base frame supports the mattress frame. The rocking driver is mounted on the base frame and has a motor, a flywheel and a connecting rod. The flywheel is rotated by the motor. The connecting rod is connected eccentrically to the flywheel and pivotally to the mattress frame. When the motor turns, the connecting rod rocks the mattress frame so a person lying on the bed rocks from side to side and pressure on individual parts of the person's body is alleviated so blood can circulate to the areas and bedsores will not develop.