Sorry to hear of your friend's and your loss.
Yes, they can transfer over the miles from the deceased's account over to the surviving spouse. Just have them call the Mileage Plus Service Center and they will give them all the details.
Basically, they'll get an address in which to send a letter of the request with both account numbers, and a copy of the Death Certificate to.