For those already in Mexico City, the urge to stay longer is understandable.
First things first:
The card you received on your way into the city, from the Immigration officer, will tell you exactly how many days you’re permitted to stay. Those who’ve come into the country many times may receive shorter terms.
If you’re lucky, you received the full 180 days permitted by law. You can stay!
The less fortunate, and especially those who’ve crossed the border frequently, or who’ve overstayed a visa in the past, may receive a shorter term.
See the complete list of WHAT NOT TO DO, to stay good.
If you’ve neared the end of the time allotted by your FMM, you should make plans to leave Mexico. You may re-enter, but there is no guarantee you’ll be granted 180 days upon you’re return.
The better way to be assured a good long stay is to apply for Temporary Residency Status. That process needs to begin in a Mexican Consulate although it needn’t be in your home country.