I have a friend who is a nurse. We were discussing my FIL after he passed. He was normally a very sweet, gentle man, but in the last 2 years of his life he had become quite contrary and cranky. My nurse friend said this pattern was very common and the nursing community has a theory that dying people sometimes get cranky as a human mechanism to make it easier to let them go. You may think it strange, but somehow that comforts me.