Until the dog heard his master's footsteps, he lay motionless on the floor for several hours.

And your question is??

There is nothing wrong with the sentence, if that's what you're asking.

And no, the verb is correct as it is. If you change it to "lays," you'll have created an error.

http://grammar.ccc.commnet.edu/grammar/notorious/lay.htm

Sorry, Anonymous, but your answer is not correct.

The word lay is the past tense of the verb lie (lie, lay, laid, has lain).

Examples:
Today he lies on the floor.
Yesterday he lay on the floor.

If you substitute the verb rested for lay, you'll see --
Until the dog heard his master's footsteps, he rested motionless on the floor.

The given sentence describes a dog who remained still on the floor until it heard its owner approaching. This sentence uses vivid language to convey the dog's immobility.