A rear frame adapted to form an electric bed with a front frame includes a fixation rack, a thigh supporting rack pivotally connected with the fixation rack, a lower leg supporting rack pivotally connected with the thigh supporting rack, a support rack located under the lower leg supporting rack and pivotally connected with fixation rack, a front extension rack, a rear extension rack, a link, and an actuator. The front extension rack is disposed to a bottom side of the thigh supporting rack, the rear extension rack is disposed to a bottom side of the support rack, the link is pivotally connected between the front and rear extension racks, and the actuator is pivotally connected between the fixation rack and the rear extension rack in a way that the lower leg supporting rack is swingable downwardly.