From experience both sides I would say don't change a thing except the optimistic 'she'll be okay' comments... and they fade naturally, unfortunately.
You can still be positive, even if the end game isn't.
Making sure her mum is comfortable and that your friend has the time to do what she needs to do, making her feel able to crumble with you if she needs to, and just being there... its all you can do.
Sometimes, discussing the actual care your mate's mum is getting and seeing what you can do/research to make it more bearable for her helps.
In reality you cannot change things. In reality you cannot really make things better. BUT, attitude is now the most important thing you can give... a good one, a kind one, a friendly one. You're doing that, you are doing enough and you sound lovely.
As you've known her so long, I assume you have a bond with her mum also? Its okay for you to be sad too. Don't feel you can't show it or have to be strong all the time. I will never forget my friend saying how much she appreciated me apologising for when I sobbed too (apologising and blubbing and hugging her close) because I think most people tried to be so strong for her she felt utterly alone.
This waiting game is awful, all you can really do is go with it and be there, and you're doing that.
I thankfully haven't lost a parent, but MIL (my other mother), friends, neighbour, ach... too many. Too many.
Look after yourself too. I know that sounds selfish, what I mean is, it is exhausting so keep yourself healthy. Have you got people around you that you can cry too? x