From Scientific American: “This saying has been traced to a 1574 dictionary by John Withals, which noted that “fasting is a great remedy of fever.” The belief is that eating food may help the body generate warmth during a ‘cold’ and that avoiding food may help it cool down when overheated”. So it sounds like your Grandma was passing down the wisdom as it was originally meant!
She was thinking fasting was therapeutic for both. Thanks for the link!