Standing - or sitting - at the foot of the stairs is a traditional punishment for naughty children. Maybe the phrase signifies that the person knows that they have done something wrong, so they'll administer their own punishment!
Worked with a really good mate who came from Preston, and his dad used this phrase, if i remember right it is an exclamation of how you feel about a thing, so much so that you would go to the foot of the stairs and shout it up to the next landing. Isn't it a lovely expression??
I have definitely heard it used in the sense of "Well, isn't that amazing/surprising" rather than the naughty children sense. Gerry Baby may well be right about this one!