According to the Or HaChaim Abraham did know they were angels.
Abraham realised that they were angels because the bearing of an angel cannot be disguised. We know this already from the wife of Manoach (Judges 13,2). If that lady realised that she faced an angel, someone of Abraham's stature would certainly be aware of the presence of an angel. After all, Abraham had already encountered angels previously. The word וירא a second time merely confirmed Abraham's original impression seeing that he had been healed and was able to run towards them. An angel has long-distance vision and inasmuch as the cure he performs is of a spiritual nature, he does not need to be physically close to the patient. As soon as Abraham felt cured, he bowed down to the angel in gratitude to G'd.
If so, why did he prepare food for them?
He also told them to take פת לחם, a reference to the inner meanings of Torah, something he alluded to when speaking about their לבכם, inner organs. He invited the angels to enjoy the inner aspects of Torah. [This is not so strange-sounding, seeing angels had never been given the Torah. Ed.] The reason he did not merely say פת but פת לחם, was a hint that this bread had inner properties, i.e. its numerical value being 78, or three times the numerical value (26) of the four-lettered Holy Name. This was an allusion to eternal life, i.e. past, present and future.
כי על כן עברתם על עבדכם, "for this is why you have come by your servant." These words were intended to silence the argument that once Abraham had recognised that his visitors were angels he should not have offered to give them human food. Although we explained that Abraham alluded to the spiritual nourishment the angels were to enjoy, this did not mean that we are to ignore the plain meaning of the verse. Terrestrial food also contains spiritually valuable ingredients as we know from Proverbs 13,25: "the righteous man eats to satisfy his soul." Abraham said to the angels that the reason they appeared in the guise of human beings was in order for them to partake of his food seeing that the spiritual content of that food also assumed the forms of the terrestrial world. The angels responded saying כן, yes, that Abraham was quite correct. They added that he should proceed as he had intended, i.e. to let them enjoy the spiritual content of the food.
And why would Sarah (on a higher level of spiritual awareness) have laughed when they made their pronouncement of pregnancy?
That's actually another question altogether...did Sarah know they were angels?
ושרה שומעת, and Sarah was listening. On the one hand the verse indicates that what Sarah heard was a message intended for her by a heavenly messenger, the messenger himself standing behind her. Nonetheless I have seen a Midrash according to which the angel was disciplined for not addressing Sarah directly with the message, preferring to deliver it to Abraham. Angels are punished for inadvertently committed disobedience or minor deviations from the instructions they receive.
It appears Sarah would not be able to decipher they were actually angels since it says she was listening. There isn't an indication that she ever saw these particular angels like Abraham. Perhaps she wouldn't have laughed had the angel properly fulfilled it's mission. Although that is only an application of the text and not a direct source.