The Shulchan Aruch itself does not explicitly mention Tikun Chatzos. In (1:2) it says that tefilos over the Churban and the Galus are very desirable, if you are awake at the changing of the Mishmaros (each third of the night). The next si'if says that it is fitting for every Yiras Shamayim to be sad about the Churban Bais HaMikdash. The Mishna Brura (9) discusses at length some of the Inyanin of Tikun Chatzos, which includes sitting on the floor with ashes on your head and saying Tehilim and Piyutim.
It was, and still is, according to the minhag of the Arizal, the custom for Yechidim to sleep form the beginning of the night until Chatzos, then arise to say the Tikun and then learn until the time for davening in the morning. Although revived somewhat in recent years, this minhag is by and large not performed by most Yirei Shamayim. The reason given is the weakness of the generation.
However the Pischei Tshuvos (1:10) brings from various sources that each person should participate in this to the degree possible, and it should not be forgotten altogether. Everyone should try to say it at least periodically, once a week, month, or at least during the three weeks. Moreover if you cannot say the whole tikun you should at least say part of it or even one or two Pirkei Tehilim from the Tikun , or even a single pasuk (Darkei Shalom), or even just to think about it at Chatzos (Chavas Da'as).
Additionally says the Pischei Tshuvos, if you are still awake at Chatzos you may say it before you go to sleep (Rav Yaakov Emden, Malbim).
Anonymous, 2009-07-27 15:05:24 "Although revived somewhat in recent years, this minhag is by and large not performed by most Yirei Shamayim. "
How can you say most "Yirei Shomayim" don't say Tikun Chatzos. This is something that is usually done in private. The Kotzker says something to the effect of: if one doesn't cry over the churban than he needs to cry over himself that he's not a Yire Shomayim. Based on this is someone a Yerei Shomayim if he doesn't recite it (or mourn for the churban in perhaps another manner that they were noheg in other areas) The Noda BeYehuda in one of his droshos says that the first thing for every Yid is to recite Tikun Chatzos. I'm not saying that I feel the pain of the churban but we have to start somewhere and try to recite at least a small portion of it at least once in a while. Otherwise we'll never get anywhere and will always say "that is only for tzadikim and mekubalim". May we merit to great Moshiach immediately.