This quote occurs just after Pi has almost a moment of epiphany where he realises that his suffering occurs in a "grand setting." He experiences a moment of almost seraphic calm as he is overwhelmed by the beauty of his surroundings, which are described as follows:
The moon was a sharply defined crescent and the sky was perfectly clear. The stars shone with such fierce, contained brilliance that it seemed absurd to call the night dark.
Pi's comment then relates to the beauty of the world around him and he is suddenly forced to reassess his own feelings of doom and gloom in the light of the beauty around him. He sees himself as part of something much bigger and much more important than his own transitory troubles, great as they seem to be from his perspective at that moment, and that helps reduce his fear and worry. He even says that his sufferings "did not fit anywhere" at that moment, and he is able to see them for what they really are.