Btw, I also think it is an option not to address it.
Like Jacob already mentioned, if she didn't address it with the child at the time, it feels to me like that opportunity was missed and is just over. I just can't see how the kid wouldn't feel massively uncomfortable for a friend's parent to *now* be like, "Hey, remember that last time I walked in and you were touching yourself?" It just seems like bringing it up with her after the fact is unlikely to be beneficial or in any way productive. And is very likely to feel creepy for the kid.
I agree that talking to the parents -- in a super-chill way -- is an option, but I also think it isn't required. After all, that child wasn't harming themselves or anyone else, nor were they doing anything inappropriate. Assuming they were in a private place at the time (like a bed they were sleeping in), it strikes me as something your girlfriend can also just leave without saying anything to anyone, because it's a perfectly normal thing to be doing. In the event she thinks the parents may shame their child for it, or overreact in some way, just letting it go may be the best option.
Never doubt that a small group of thoughtful, committed citizens can change the world. Indeed, it is the only thing that ever has. - Margaret Mead