Praise be to Allah, the Lord of the Worlds; and may His blessings and peace be upon our Prophet Muhammad and upon all his Family and Companions.
Masturbation is equally forbidden for married and unmarried persons but its prohibition for a married person is greater. The reason mentioned in your question does not justify committing this sin. She should inform her husband about her need and should ask him to be patient till she is satisfied because the main purpose of marriage is sexual satisfaction of both the husband and wife. Hence, she should not feel ashamed to ask her right from her husband.
However, it is permissible for a wife or a husband to masturbate each other.
Allah knows best.