Reference thread for this article:

The differences in dimensions between lovers means that direct contact is not really possible, meaning the closest analogue to 'sex' between someone and his waifu would be masturbation with the concept of his waifu in his head. The general consensus our users have reached is that masturbating to your waifu is okay. Initially, some would consider masturbating to your waifu to be a despicable act, essentially 'defiling her purity'. Many do not masturbate to their waifus, instead masturbating to other characters/things which they do not treasure as highly. However, putting yourself in the shoes of your waifu spurns a line of logic which eventually suggests this mentality is flawed. Assuming your waifu has an active sex drive, they may take offense at other things being the focus of your lust. If your waifu told you that she only masturbated to other men and never to you, you would probably feel jealous or offended. Conversely, if she told you she masturbated only to you, you may feel flattered that you are the focus of her sexual desires to the exclusion of all else. Ultimately, sexual desire forms a component of a healthy relationship and nobody should feel ashamed if their love is not strictly platonic.

An exception to the main theory would be the case where the waifu has no 'sex drive'. This may occur if she is very young (and thus likely hasn't fully developed the maturity to understand sex), if she was extremely innocent or if she viewed sex as an abhorrent act. In this case, masturbating to her could potentially be a bad choice.

An important distinction to make is the difference between 'loving' and 'abusive' sex/masturbation. Although nobody physically gets hurt, it is unethical and corrupting to the concept of your waifu to masturbate to the thought of her in compromising situations which she does not like. To take a common example, masturbating to the thought of her being raped would likely be wrong. 'Likely' is the word here: if she happens to enjoy rape or whatever, then although she may externally seem to be suffering, if she enjoys herself then ultimately it means you two are sharing an enjoyable experience, thus crossing the line into 'loving' territory.