If it is hot and very humid, and the A/C runs a long time and frequently, ice will form on the coils and when it becomes a solid block of ice air can't flow through it, or the coils, and it wont cool the house but it will keep running and making more ice. As
@Supervisor42 mentioned, when you shut it off overnight the ice melted and now it is cooling again. It never stopped working, it just stopped cooling. Keep this in mind for the next time, maybe even make a small not and post it by the thermostat so you recognize the problem if it happens again. Some/most repairmen wont tell you the real reason and will "make repairs" and charge a lot of money for just turning it off to let the ice melt.
I even had this happen in my truck once in Las Vegas. It was a hot humid day and the AC stopped blowing cold, turned off the A/C but left the fan blowing and it was working again in about 20 minutes.
That is why I like chilling the house down and night, it cools everything off inside and it takes longer for the house to warm up during the day making the A/C run less in the heat of the day. Plus I sleep better when it is chilly.