This study explored postoperative changes in sleep duration and physical activity and their relationships with physical function recovery, the muscular strength of the affected side and blood glucose control in elderly adults (n = 41) with diabetes mellitus (DM) who underwent surgery for hip fracture. Thirty-two participants (78.0%) had abnormal sleep durations for at least two time points, and they all had low physical activity levels (an average of 1348.2 kcal/day for the first month, 1377.9 kcal/day for the third month, and 1389.1 kcal/day for the sixth month) during the six months post-hip fracture. The participants with normal sleep durations showed greater femoral muscle improvement on the affected side (adduction: β = 3.70, p = 0.029; abduction: β = 7.25, p = 0.016) and better blood glucose control before meals (β = −73.29, p < 0.001) and after meals (β = −47.90, p = 0.007) compared with those with abnormal sleep durations. Those with higher physical activity levels had better physical function recovery.