variation exists: Awa' an' bile yer heid! (Scottish)
The origins of this phrase are as follows, from http://www.phrases.org.uk:
"This relates to the fact that in South Pacific societies cooked food was 'noa' or the opposite of tapu (tapu is loosely translated as sacred though it has a deeper meaning than that). The head was considered the most sacred part of the body and one doesn't usually pat children on the head, or stroke a person's hair. An exhortation to turn your head into cooked food was regarded as the greatest possible insult."