Sayyidi Habib Umar bin Hafiz (may Allah protect him and benefit us by him) gave the following guidelines on wearing a turban.
The purpose of wearing a turban (or ‘imamah) is following the Chosen One ﷺ and showing other people this great sunnah.
1. Turbans can only be worn after the age of puberty and should only be worn for Friday prayers and significant occasions (such as Eid). The turban must not exceed 5 cubits in length.
2. When a man gets married, he can wear a turban most of the time, but not exceeding 5 cubits.
3. If he completes his studies of the Sacred Law and graduates (ie becomes a scholar), the turban can be up to 7 cubits in length.
4. After reaching the age of 40, the length of his turban can reach up to 10 cubits, but not more than this, for this is the maximum length narrated regarding the turban of the Messenger of Allah ﷺ
Source: Ubaydun, F.(2014) Tawjih Al-Nabih. Dar Aldeyaa, Kuwait. (p. 176).
A cubit is measured from the elbow tip to the middle finger.
For Shafiis and Hanbalis it is 62 cm, for Malikis 53 cm, for Hanafis 46 or 48 cm.