I believe you are referring to the effects of endorphinswhich are hormone-like, naturally occurring substances produced by the brain in response to stressors. For instance, the "high" that runners experience when their muscles are stretched, tired, and painful is thought to be produced by these endorphins as the brain attempts to block the pain. So, too, these same endorphins could now be helping your mother manage her pain.
Stress and pain are the two most common reasons that endorphins are triggered in the brain. It's thought that they respond similarly to common pain drugs, called opiates that are used to manage pain. One such opiate used in hospice care would be morphine. When the body releases these endorphins, they act like pain medication, so patients feel less pain, less hunger, and a more peaceful feeling overall.
Hospice nurses often observe patients who are near death to be more comfortable, even more alert, as they enter the dying process. If your mother is experiencing these pain-free days now, she will hopefully have a peaceful life closure.