Since God always was and always will be at the time a prayer was said for someone who is already physically dead that person was not yet physically created at the time the prayer was said. Regarding Lazarus, a single exception made to an operating principal would open the door for yet another exception. Eventually, the operating principal will cease to exist.
Jesus did in fact pray for a dead man to come out of the grave. There is also a passage in 2 Timothy where it appears that it was implied that Onesiphorus was dead at the time Paul prayed for the Lord to grant mercy to his household and to Onesiphorus himself on that 'Day'. While I do not consider this passage conclusive evidence that Onesiphorus was dead at the time of the prayer I do wonder why not pray for God to grant him mercy at the time that he was still alive? If he were already dead what would be the point of praying for him if praying for the dead was an exercise in futility and to no avail.
2 Timothy 1:16-18
The Lord grant mercy to the household of Onesiphorus for he often refreshed me and was not ashamed of my chain, but when he arrived in Rome he sought me out very zealously and found me. The Lord grant to him that he may find mercy on the Lord in that Day, and you know very well how many ways he minister to me at Ephesus.
It very much appears that Paul was referring to him in the past tense as if he was already dead. Again, even if he were still alive why wouldn't Paul pray that God grant him mercy that very day rather than waiting for that 'Day'.
In my opinion Paul was praying for some dead guy. It is not my opinion however that Jesus prayed for Lazarus to come forth from the grave after being dead for 4 days. It is a matter of biblical fact.