Background We conducted a study using a case-crossover design to clarify the risk of acute effects of zolpidem and benzodiazepine on all-sites of fractures in the elderly. Design of study Case-crossover design. Methods and Materials Elderly enrollees (n = 6010) in Taiwan's National Health Insurance Research Database with zolpidem or benzodiazepine use were analyzed for the risk of developing fractures. Results After adjusting for medications such as antipsychotics, antidepressants, and diuretics, or comorbidities such as hypertension, osteoarthritis, osteoporosis, rheumatoid arthritis and depression, neither zolpidem nor benzodiazepine was found to be associated with increased risk in all-sites fractures. Subjects without depression were found to have an increased risk of fractures. Diazepam is the only benzodiazepine with increased risk of fractures after adjusting for medications and comorbidities. Hip and spine were particular sites for increased fracture risk, but following adjustment for comorbidities, the associations were found to be insignificant. Conclusion Neither zolpidem nor benzodiazepine was associated with increased risk of all-site fractures in this case cross-over study after adjusting for medications or comorbidities in elderly individuals with insomnia. Clinicians should balance the benefits and risks for prescribing zolpidem or benzodiazepine in the elderly accordingly.