“And if a woman fears cruelty or desertion on her husband’s part, there is no blame on them if they arrange an amicable settlement between themsleves. And such settlement is best.” [An-Nisa:128]
Al-Haafidh Ibn Katheer stated:
If a woman is afraid that her husband will shun her or turn away from her, then it is permissible for her to relinquish all or some of her rights – including her maintenance, clothing, or sexual relations – from the rights that she has upon him. It is permissible for him to accept this from her, so there is no wrong in her relinquishing those rights, and no wrong on him if he accepts this from her. Concerning this Allaah says:
“There is no blame on them if they arrange an amicable settlement between themselves, And such settlement is best.” [An-Nisa: 128]
Meaning this is better than separation:
Then he related the story of Sawda bint Zam’ah, at the time when she grew old and the Messenger of Allaah, may the peace and blessings of Allaah be upon him wanted to divorce her. She negotiated with him that he retained her while she gave her night (of sleeping with him) to ‘Aisha and he accepted and retained her upon this agreement.
See Tafseer Ibn Katheer [2/406, last edition].