Lots of guys responding to this one - goes both ways y'know. Anyway, yes, sometimes it's appropriate to court those in a relationship, particularly if you are aware of that relationship being an unhappy one. It is true that women (at least in my experience and that of my friends) tend to stay with a guy even if they are not keen on the relationship lasting forever, for lots of reasons - some of them very practical and rational and others more related to emotional insecurity and/or societal perception of being "alone."
That said, the more assertive women in relationships who are unhappy are probably already on the hunt for themselves and if they haven't baited a trap for you, you're not on their list of potentials. As someone who has not been single for 15 years, but only in my current (very happily engaged, I might add before anyone calls me something rude) for 10, I have some experience with this process.
On the other hand, some men act the same way, but usually out of what I assume to be a denial factor of the failure of the current relationship and the stigma attached to failing with a woman in society that their gender seems unduly burdened with. Basically, my view of why men "cheat" (and I never liked that term, since it seems to contextualize long term relationships as a test and anything outside the relationship like a sheet of crib notes or something similarly ridiculous) is that it is somehow better for them to have two women at once, one they are obviously unhappy with or they wouldn't be going elsewhere and one they can't create real relationship with because of aforementioned woman, than to "fail" with one woman by leaving her to go look for the next; whereas women "cheat" when they are preparing to leave the man they're with, but have guilt about making him out to be such a failure when in fact they just aren't that into him anymore. At least that's how I always felt about it - getting a guy to break up with me because my breaking up with him would be painful to him was always the worst part about ending a relationship in my younger years.
Then again, being solicited when one is in a relationship they are happy (or happy enough, depending on the circumstances) in is really quite bothersome, and can cause problems where there weren't problems before - sometimes causing the relationship they are in to become unhappy and/or end prematurely.
It also depends largely on the relationship in question. A "friends with benefits" relationship is pretty open to outside courtship, generally speaking, and usually viewed as a temporary situation by both parties anyway, but a marriage is supposed to be something binding and impenetrable from the outside, ideally speaking. There's a lot of gray area there too - and age groups take these things differently. A couple movies and a dinner does not a "relationship" make in some people's opinion, for other people that's already serious. There are a lot of factors to consider.
So, in answer to your question: it isn't a very good way to go about finding a relationship for yourself, in my opinion. If someone in a relationship wants to change over to being in one with you, they'll let you know - fishing for that can put you in a position to become a problem for everyone, and also isn't very nice, and is - as you can observe from some of the other responses, rather frowned upon. By both genders, I might add. When I was in the market, I always considered a man who was with another woman to be "hers" in every aspect of the word and wouldn't consider going after him under any circumstances. Now, if he were to seek me out without any actions on my part to encourage that - then that's a different thing in a way, and I would consider it - but usually, as a woman, dealing with the previous woman is way more hassle than that guy is likely to be worth, especially if he will be shopping around to one-up me while I deal with that mess.