Praise be to Allaah.
The Sunnah is to keep the arms away from one's sides when prostrating, because of the report narrated by al-Bukhaari (828) from Abu Humayd al-Saaidi (may Allah be pleased with him) which describes the prayer of the Prophet (blessings and peace of Allah be upon him): When he prostrated, he placed his hands (on the ground) without sticking the arms out or tucking them close (to himself).
tucking them close (to himself) means pressing them against his sides.
Fath al-Baari, 2/302
It was narrated that Maymoonah bint al-Haarith (may Allah be pleased with her) said: When the Messenger of Allaah (blessings and peace of Allah be upon him) prostrated, he kept his arms so far apart that the whiteness of his armpits could be seen from behind. Narrated by Muslim (497).
According to another hadeeth narrated by Muslim (496): When the Prophet (blessings and peace of Allah be upon him) prostrated, if a lamb wanted to pass beneath his arms, it could.
Al-Nawawi (may Allah have mercy on him) said: What this means is that he held his elbows and upper arms away from his sides. End quote.
Ibn Qudaamah (may Allah have mercy on him) said:
It is Sunnah to keep the upper arms away from the sides and the stomach away from the thighs when prostrating, because the Prophet (blessings and peace of Allah be upon him) used to do that when he prostrated. Abu Abd-Allah said in his Risaalah: It is narrated that when the Prophet (blessings and peace of Allah be upon him) prostrated, if a lamb wanted to pass beneath his arms, it could do so. That is because of the great extent he went to in lifting his elbows and upper arms. End quote.
Ibn al-Muneer (may Allah have mercy on him) said: The wisdom behind it is so that each part should stand by itself and be distinct from others, so that when prostrating one person will appear as several. That means that every part of his body is independent and does not rest on others when he prostrates. End quote.
Fath al-Baari, 4/200
This position when bowing is Sunnah and is not obligatory, according to scholarly consensus. Whoever does that will be rewarded; whoever does not do it when he is able to do it is not sinning by not doing it, even though he is missing out on doing the Sunnah.
Moreover, there is the condition that this should not lead to any annoyance of one's neighbours and it should not be in a situation where it is difficult to hold the arms away from the body, as is usually the case when praying in congregation. Whoever tries to do that - especially when the row is tightly packed - will annoy his neighbour or make it difficult for him.
It says in Kashshaaf al-Qinaa, 1/353:
It is Sunnah for the one who is prostrating to hold his upper arms away from his sides and to hold his stomach away from his thighs and to hold his thighs away from his calvesâ€¦ So long as he does not annoy the person beside him by doing that, in which case he should not do it because this causes annoyance, which is haraam, when doing that. End quote. See al-Sharh al-Mumti, 3/90