Sometimes our three year old has potty accidents. If she's playing and doesn't want to stop what she's doing she'll accidentally go potty in her pants. Our five year old used to have a lot of potty accidents when she was three years old.
Our three year old potty trained very well. She rarely had accidents in her clothes during the day and at night. At bed time we started putting a night time pull-up over her underwear and she usually woke up dry. We started putting her to bed without a pull-up and she still woke up dry. Then, all of a sudden she started having potty accidents more frequently. There's times I have to do laundry two or three days in a row because I have to wash her wet bedding. This happens in spurts and when it does we put her to bed with a pull-up over her underwear. Then she'll go a long time without having an accident. Weird huh?
I'm not sure what can be causing her to wet the bed. Maybe a bad dream? When she has an accident I remind her what the potty is for and encourage her to use it more often. I advise her to try and use the potty before bed and not to wait too long to go while she's playing.
Punishing your child because they had a potty accident isn't a good idea as it will make the potty accidents worse. Your child will feel embarrassed and stressed. Try not getting frustrated with your child and reassure them that sometimes accidents happen. You and your little one will get through this rough patch together.