The important thing is that the soul departs while its owner is a believing, repentant Muslim, as this is a good ending. As for the details, they are lengthy. The grave is either a garden from the gardens of Paradise or a pit from the pits of Hellfire. And Allah The Almighty Knows Best.