I write this from the perspective of my dad.
When he was a child, his father was always there physically to support him but had personal difficulty expressing emotional support, such as saying "I love you" or giving hugs (edit: his dad loves to accept hugs, just had mental difficulty giving them). As his father has been aging, just in the last couple years he's been having a lot of medical problems, including difficulty remembering, poor blood circulation and blood not clotting, and especially recently including leg weakness.
In this state, his dad has been a lot more self-aware that he genuinely may be near death's door, and has been acting strangely. My dad came to me about an hour ago crying and said "You know when I was a child, my dad didn't really hug me. Now that he's been having these problems, he won't stop hugging me. I think something bad is happening.". I noticed the same things happening; my grandpa (his dad) came and hugged me for the first time just yesterday, and it was a very long hug. I assume it's due to him knowing that death might be close.
What can I do for my dad to help him feel better? What can I do for my grandpa to make him feel better? Is there even anything I can do? Does anyone know if there is some condition that I am just misunderstanding? Please, any advice is wanted and I will answer most questions.