Masturbation is not some degrading sin. It's perfectly natural. You do not need your wife's permission to do so. Unless of course you do it so much it inhibits your relationship with your wife. It doesn't seem like that is happening at all though.
You seem like you are genuinely trying, but she sounds like she is not. You haven't had sex in three years? And she still expects you not to masturbate?
The fact that she does not even attempt to go get this painful sex problem checked out just shows her disrespect for you. She expects you to do all of the work in the relationship. She has no right to get on your case about trust.