Track my iphone doesn't work when my phone is asleep?

It works fine when I'm using it, but if I leave it alone for a period of time, tack my iPhone says it's offline.

Added (1). Thanks Michael. You have a great day as well!

Maybe when you leave your phone alone maybe it's just don't want to used the battery and when you turn your phone on it turns on if someone got your phone you can track your phone hopefully I help you have a nice day

Find My Phone will eventually pick up a device even when it's asleep. It may take a while, though, as the device doesn't constantly communicate with the network in order to save battery life.