That's a really good idea Janet.
There are already generous provisions in my will in that respect, and I've always said that if my film ever gets optioned I intend to make sure that at least some of the money earned from that goes in that direction one way or another.
But as to how one sets up a charity basically here in the UK you just register it with the charities commission and in the US I imagine there is a similar body.
You need to have some trustees to run it and a constitution but that's about it.