God still listens, so you should keep praying. If you have had a habit of prayer, you should keep doing it, even if you fall into Mortal Sin. There is a story from a book (cannot recall the book), of a young man who had the practice of reciting 3 Aves every evening before he retired for the night. He had fallen into a life of immorality and frequented prostitutes with a friend. Story goes that his friend was attacked while going home one evening, and died. The friend appeared to him to him from Hell to warn him that the same fate awaited him, but he had been spared due to his Aves to the Blessed Mother. He should take this warning seriously and abandon his sinful life, which he did do. He confessed his sins and renounced his past, and entered a religious order. Those prayers literally saved him from a terrible fate, and he was given a rare chance to reform and amend his life.
Also, while you cannot earn merit and gain graces while in a state of mortal sin; once you have confessed and submitted them to the keys of the confessional, at the moment you are absolved, you gain the graces and merits you would have earned. It is as though you never lost them. So, in addition to the restoration of Sanctifying Grace; all those other merits and graces you would have earned due to prayers and good works and holy deeds, are now restored to you. I can’t think of a better reason than that, to be persistent with prayer. To think that when we repent of mortal sin, we may gain the graces and merits we had lost due to sin. Prayers done when in a state of mortal sin are never wasted ones, as your Heavenly Father awaits your return to him, like the Prodigal Son.