Not every death is quiet. Some people, in their last days, become restless and agitated: they pluck at the blankets, try to climb out of bed, call out, or grow confused and fearful. It is one of the hardest things for a family to watch, and it is easy to read it as pain or terror. Usually it is a treatable symptom of the body and brain shutting down, and the hospice team can settle it.
This is one of the signs covered in what dying actually looks like; this page goes deeper on it.