When a man is in God's grace and free from mortal sin, then everything that he does, so long as there is no sin in it, gives God glory and what does not give him glory has some, however little, sin in it. It is not only prayer that gives God glory but work. Smiting on an anvil, sawing a beam, whitewashing a wall, driving horses, sweeping, scouring, everything gives God some glory if being in his grace you do it as your duty.