I have a 5 year old son. We only took him out of pull-ups at night a few months ago, and he still has accidents once a week or so. Typically, he wakes up to go, but can't get to the toilet in time, so it isn't always a wet bed, but often wet pyjamas and so on. Recently we spent a week at his grandparents, and he regressed (excitement and strange place - hadn't been there since he was a baby), and wet the bed 3 nights in a row. Granny was very understanding, but since she lives in an area on strict water restrictions, I went out and bought some pull-ups. Less stress all round.
Current medical advice says not to even begin to worry about bed-wetting until a child is 6 or 7, after which it's wise to screen for medical issues. It's simply a matter of muscles strengthening, and nerves sending a fast enough message to the brain.
I tell my son that his body and his brain are still learning to talk to each other, and sometimes one can't wake the other up fast enough.
If you can't have a bit of kindness and understanding for your own grandson, you'd better hope he's not the one who's left to visit you in the nursing home if one day you're old and incontinent.