These phrases have similar meanings and emphasize how much they had rebelled again God, which is why they had been imprisoned. (See: [[rc://en/ta/man/translate/figs-parallelism]])
Here the heart represents a person, but specifically his will. AT: "He humbled them by allowing them to suffer hardship" (See: [[rc://en/ta/man/translate/figs-synecdoche]])
The word "stumbled" refers to times when these people got into very difficult situations. AT: "they got into trouble and there was no one to help them out of it" (See: [[rc://en/ta/man/translate/figs-explicit]])
It is implied that they are praying to Yahweh so that he will help them. See how you translated this in [Psalms 107:6](./004.md). AT: "Then they prayed to Yahweh to help them in their trouble" (See: [[rc://en/ta/man/translate/figs-explicit]])
Here David describes Yahweh saving them from their distress as if their distress were a physical place that he was bringing them out of. AT: "he saved" (See: [[rc://en/ta/man/translate/figs-metaphor]])