You may apply for an extension once at your 90 day mark, but then you must leave the country at the 180 day mark. Upon return you can apply for an extension again in 90 days, but then you must leave again at the 180 day mark and so on and so forth.
There is no limit to how many times you can do this, however, it should be noted that you are "applying" for the extension, there is no guarantee you will be granted one.
Depending on where you're living a border crossing to Costa Rica, is in my opinion, easier. It's also cheaper.