Spirituality is not just about religion. Different people will understand and experience spirituality in their own unique ways. Spiritual or existential beliefs can help people to find connection, meaning, and quality in their life and often to find peace. 
At the end-of-life, people can question beliefs and values as well as how they have lived their life. This is understandable when confronted with issues related to death, dying and loss. People process these questions and issues in varied and individual ways.
Some will want to talk and others will be happy to have company in their silence. Health professionals are encouraged to allow people the opportunity to explore their spirituality without judgement and in their own way. Patients and family members can also be referred to spiritual leaders if they wish.
Sometimes patients become unsettled and appear to be in distress. This may not be due to physical symptoms but to spiritual or existential issues. They may have unresolved concerns that they have been unable to process. Careful assessment is required to ensure that these are addressed where possible. The issue of sedation in the terminal phase also needs careful consideration, as a person in existential or spiritual distress may appear to be restless and unsettled and medication may be an initial consideration.