Three possibilities: loved ones pray just after the moment of death, when the body is to be prepared for embalming, presumably at the funeral home or other facility, and if there is to be no funeral liturgy (perhaps because of the lack of a resident priest) prayers will take place before heading to the grave.