It is very common to see Brothers folding their trousers up above the ankles before Salah, and then folding them back down after Salah, I myself have done this in the past.
I heard some brothers say this should not be done, but I never paid much attention to it, until recently when I began looking into this issue.
So the ruling is this should not be done.
An extract from Mashhur Hasan Al Salman's 'The Clarified Ruling Of Mistakes Done In Salāt'
 Tucking up clothes in Salāt:
Some muslims tuck up their clothes before they begin their
Salāt which is something forbidden. Ibn’Abbās related, ‘the
prophet said: ‘I was ordered to prostrate on seven bones,
was forbidden to tuck up my clothes and to collect my hair in
Ibn Khuzaimah dedicated a chapter of his book “The Sahīh” for
this issue and titled it with “Tucking up clothes in Salāt”.(2)
An-Nawawī said: ‘The ‘Ulamah agreed that it is a forbidden act
to tuck up clothes, roll up sleeves or the like in Salāt’.(3)
Imām Mālik said -concerning rolling up sleeves, then
performing Salāt in such a state: ‘If one did this act while working
then started his Salāt in such a state, it is all right but if he did it
intentionally for doing Salāt or during it then there is no good in
In my opinion, the prohibition mentioned in the hadīth is a
general one whether one tucks up his clothes or collects his hair
before or during doing Salāt.
An-Nawawī said: ‘Tucking up clothes or collecting hair is
something detested. If one does Salāt in such a state, he has done
something bad but his Salāt is correct and valid. Abū Ja’far,
Muhammad Ibn Jarīr At-Tabarī held this opinion and related the
‘Ulamah’s unanimous agreement on it. Ibn Al-Munthir related from
Al-Hasan Al-Basri that if one does such an act and then performed
Salāt, he should repeat it’.(5)
Then he continued saying: ‘Al-Jumhūr’s opinion is that this
prohibition is a general one whether it is done intentionally for
Salāt or before it’. Ad-Dāwūdy, however, said: ‘The prohibition is
addressed to those who do this act intentionally for Salāt. The
sounder opinion is the first one, which was held by the Sahāba and
(1)Narrated by Muslim in the Book of Salāt, chapter: The organs of prostration and the
prohibition of tucking up clothes and gathering hair in Salāt, (vol. 1 / p. 354) (no.
490), An-Nasā’ī in the book of Salāt, chapter: The prohibition of tucking up hair in
prostration, (vol. 2 / p. 215), Ibn Mājah in the book of doing Salāt, chapter: Tucking
up clothes and gathering hair in Salāt, (vol. 1 / p. 331) (no. 1040), Ibn Khuzaimah in
the Book of Salāt, chapter: The prohibition of tucking up clothes in Salāt (vol.1 / p.
383) (no. 782). I mentioned the first part of the hadīth’s narrations when editing
“Man Wāfaqat Kunyatuhu Kunyata Zawjihi Mina As-Sahābah” by Ibn Hayawayh.
(2) “Sahīh Ibn khuzaimah” (vol. 1 / p. 383).
(3) “Sharh Sahīh Muslim” (vol. 4 / p. 209).
(4) “Al-Mudawwanah Al-Kubrā” (vol. 1 / p. 96).
(5) Sharh Sahīh Muslim (vol. 4 / p. 209).
(6) The previous reference.