Two things.
1) If you're using stuff with super solid time, like hip hop, that's basically just as good as a metronome, if not better because it also has musical context. You're totally on a good track practicing to stuff like that. I also like to make my own loops or use things like "dance" music that is extremely simple with a solid consistent meter.
2) As you might infer from above, lots and lots and lots of music was not recorded to a metronome and it in itself does not have perfect beat, so even if you're on, you might still sound off. It's usually best to avoid this type of stuff.
Onto your question, disregarding what I just wrote.
Count. Get a solid count going in your head, or even out-loud BEFORE you start to play along. The key is to keep that count going through your fills so when you come back in, you're hitting the one. I recommend 8th note count to start with.