Generally, it is not ok to sleep while you are babysitting children. You need to be awake and listening to the kids you are looking after. Parents tend to hear their children even while they are asleep. They are attuned to their children. Babysitters are not. They need to stay awake at all times.