Masturbation is lust no matter how or who looks at it. You're lusting in your mind body and spirit.
There are other topics on this subject if you care to search.
Don't be embarrassed, it's an education for all of us
It is possible to do the physical act without lust.
if there is lust involved then lust is the sin, inappropriate contentography or lusting after someone's wife or objectifying another person but...
if you can do the act without lust.. the bible is silent on it.
We're promised not to be tempted beyond our ability to bear (1 Corinthians 10:13) and in fact, God will provide an escape to be able to bear temptation. If the sin is adultery or fornication that a person is being tempted into, masturbation can be the escape that prevents adultery or fornication. For an unmarried man there is a need that is not being met. That is a strong temptation to just "hold it in" forever. That's like being asked to just cross your legs and hold the urge to urinate in forever.
Mind you while people will say sex is not a need, there are sexual related needs. Any part of the body that is called a "tract" like a digestive tract, urinary tract, respiratory tract, or.. genital tract... is a system of the body designed to have things MOVE THROUGH it. not store it indefinitely.
All people have a need to breathe, you can't hold your breath in your respiratory tract forever. If you try, your body WILL breathe on its own after losing consciousness.
All people have a need to urinate and defecate, you cannot hold it in forever. If you try, your body will do it on it's own .. so most people would probably opt to voluntarily take care of that need in a cleaner way.
Women have a need to ovulate until they go through menopause, and their body will do it, and if the egg is not fertilized, they'll shed it.
Men have a need to [bless and do not curse][bless and do not curse][bless and do not curse][bless and do not curse][bless and do not curse][bless and do not curse][bless and do not curse][bless and do not curse][bless and do not curse]. if they do not do it voluntarily while conscious, their body will do it when they're unconscious.. and while you say there's nothing to be embarrassed about that, it really is like bedwetting or being incontinent, and mosaic law calls it an uncleanness (Deuteronomy 23:10)
Because the body will do it involuntarily if you do not voluntarily do it, it is a physiological need.
Just like if you are not "regular" it increases risks of colon cancer, abstaining from [bless and do not curse][bless and do not curse][bless and do not curse][bless and do not curse][bless and do not curse][bless and do not curse][bless and do not curse][bless and do not curse][bless and do not curse][bless and do not curse][bless and do not curse] does actually increase risks of prostate cancer. (
[bless and do not curse][bless and do not curse][bless and do not curse][bless and do not curse][bless and do not curse][bless and do not curse][bless and do not curse][bless and do not curse][bless and do not curse][bless and do not curse][bless and do not curse] Frequency and Risk of Prostate Cancer: Updated Results with an Additional Decade of Follow-up - PubMed)