I did that during my pregnancy aswell, I have extremely thick curly hair so I can't do my hair without washing it lol. I found once the tub became a little to uncomfortable the kitchen sink worked wonders :) I asked my OB at the time she laughed at me told me not to be so paranoid and just keep myself comfortable (I always asked her weird questions)
I have done that countless times throughout all of my pregnancies. It does get a bit uncomfortable but I found ways around it. It never caused any problems for me.
Well...I would imagine that it will become uncomfortable at some point. But...the general rule for your belly is: if it isn't uncomfortable, if you don't feel like it's hurting, you're probably not hurting the baby. Some women sleep turned onto their bellies at night, so I doubt leaning over the side of the tub will hurt you for a brief time....but like I said..it's probably going to become uncomfortable soon, if not impossible, so you might want to get into a new habit! :-)
But as far as safe? Should be fine, as long as it doesn't hurt.