I think a lot of people get inspiration from legends and myths so there's no problem in that at all.
And since they are such old stories they don't have any copyright on the use of the characters in them, I assume, so playing with the base of a legend story to make a manga is probably quite a safe bet.
Looking at manga and anime that already exist, a lot are clearly based on mythology, especially Japanese gods and whatnot, the same characters of legend often appear in different animes, but styled to the writers whims (like if they are a cute girl (way too overused!) or an old man or an animal or whatever) (as an example, in Noragami, one of the Four Heavenly Kings in Japanese Buddhism, Bishamonten, is male, but appears as a female in the manga/anime. Noragami heavily uses Gods from Japanese religion/mythology in it's character lineup and story concept)
I think if you're already thinking that you're inspired then that's your answer right there, it's a good method.