What is the Biblical or traditional precedent or command regarding praying before meals? A very common Christian practice is to "say grace" or to "give thanks" before each meal.  What is the Biblical precedent or command for this?  In other words, why do we give thanks then and not before going to bed or going to work or any other common occurrence?
There is definitely precedent:
As Christians, we should be following the example set by Christ, who gave thanks before feeding the multitudes in Matthew 14:19-21 and Matthew 15:34-36. He also did so in Luke 24:30.


  Matthew 14:19-21
  
  King James Version (KJV)
  
  19 And he commanded the multitude to sit down on the grass, and took
  the five loaves, and the two fishes, and looking up to heaven, he
  blessed, and brake, and gave the loaves to his disciples, and the
  disciples to the multitude.
  
  20 And they did all eat, and were filled: and they took up of the
  fragments that remained twelve baskets full.
  
  21 And they that had eaten were about five thousand men, beside women
  and children.
  
  Matthew 15:34-36
  
  King James Version (KJV)
  
  34 And Jesus saith unto them, How many loaves have ye? And they said,
  Seven, and a few little fishes.
  
  35 And he commanded the multitude to sit down on the ground.
  
  36 And he took the seven loaves and the fishes, and gave thanks, and
  brake them, and gave to his disciples, and the disciples to the
  multitude.
  
  Luke 24:30 (King James Version)
  
  King James Version (KJV)
  
  30 And it came to pass, as he sat at meat with them, he took bread,
  and blessed it, and brake, and gave to them.


Paul also did so in Acts 27:35.


  Acts 27:35
  
  King James Version (KJV)
  
  35 And when he had thus spoken, he took bread, and gave thanks to God
  in presence of them all: and when he had broken it, he began to eat.


I could go on, citing verses that tell us to be thankful in all things, to pray without ceasing, but those would be weaker, and not specific to your question, so I'll stop with these three examples as Biblical precedent.

There is a command in Deuteronomy about giving thanks after the meal:


  Deuteronomy 8:10
  
  King James Version (KJV)
  
  10 When thou hast eaten and art full, then thou shalt bless the Lord
  thy God for the good land which he hath given thee.