both our AC's were doing the same thing in hot humid weather. The tech who couldn't come out because he was so busy told us to turn the fan on "high" and leave it on high. He said the unit will freeze up in humid weather and the compressor will cut off. He said that when you have the fan on high the air moves faster and prevents the coils from freezing. Also check to make sure the water is draining well outside. Since we have been leaving the fan on high no more problems. Turn the unit off and allow it to sit for a few hours, turn it back on with fan on high.
You can also try a thermostat reset which should be in the manual for the type of thermostat you have.