Background: Several factors are involved in occupational accidents such as individual and environmental factors. Organizational citizenship behaviors (OCBs) and optimism are useful in the prediction of organizational behaviors as well as in the prediction of organizational virtuousness and job performance. Objectives: The present study aimed to evaluate the relationship among optimism, extra role behaviors or OCB, and occupational accident in working nurses and nursing aids at two hospitals in Qom, Iran, 2017. Methods: This cross-sectional study was conducted in two hospitals and was carried out among 177 nurses and nursing aids (response rate = 88.5%). The instruments used included demographic, optimism and OCB questionnaires. A forward-backward technique was applied for OCB face validity assessment. SPSS V. 20 software was used to analyze data by Mann-Whitney, Kruskal-Wallis, t-test, ANOVA, and Poisson regression. Results: A total of 40.6% of participants have experienced cases of occupational accidents. OCB's mean score was 62.15 (± 12.61). Average score of optimism was 10.51 (± 2.60). Based on Mann-Whitney results, optimism was different between men and women (P = 0.004) and men had a higher level of optimism. Nursing aids experienced lower occupational accident (52.4%) than nurses with the BSc degree. Shift workers had experienced lower occupational accident (34.3%) than day workers. In addition, each unit increasing in optimism score was led to 6% increasing in the occupational accidents rate. Conclusions: According to the obtained results, the implementation of adjustment programs and reducing the load of mental and physical work as well as improving the nurse's organizational behaviors would be necessary. In addition, sufficient training to improve the nurses' attitude toward safety is recommended.