Let's talk about how to avoid nighttime accidents. First of all you want to make sure that you limit the child's drinks after dinner time, especially in the evening. If they need a sip of water when they are brushing their teeth, that's fine but they shouldn't have any more to drink after dinner. Also make sure your child fully empties her bladder before she goes to bed. If your child tends to have a small bladder or it seems like your child can't hold it all night long, then you can consider waking her up in the middle of the night. For instance, if she goes to bed at 7:00 and you go to bed at 11:00, you could consider getting her up and having her to go pee and then having her go right back to bed.
You can also provide a small lantern or flashlight in case she is scared of the dark then she can use that to get herself to the potty or you can put a training potty next to her bed so she doesn't have to leave the room. Either way if your child has night time accidents, it is important not to get frustrated or angry. It's is okay if they have accidents and you want to make it the natural consequence if they have an accident, they need to help out the cleanup process. You can make them responsible for putting the wet sheets in the washing machine and the wet clothes in the washing machine and you can have them independently re-dress themselves.
If your child is having nighttime accidents, you do not want to put diaper on that child unless it is over their underwear. It is really important that once you start potty training, that the child never feels a diaper against her skin. So if you are concerned about an accident, she can wear her underwear to bed but put a diaper over the underwear. Lastly you can encourage your child to stay dry all night long by giving her a motivation to stay dry. Guess what if you wake up with dry pants, then you can have ice cream for breakfast. That would help night time accidents.