This happened with my daughter (who is now 4) when she was 2-ish. We took her to an orthopedist, and it ended up being a virus? that had settled into her hip. Anyway, it was some sort of non-threatening infection that had settled into her muscle which is rather common in little kids and that my orthopedist knew about and was not worried about. It worked itself out.