It depends on what you call sleep. Ants do rest, but they have no eyelids, so they can’t shut their eyes. Maybe they nap, but it’s with their eyes open. They forage for food only during the day. So this suggests an active period and an inactive period.
And they are dormant during the winter. This means their metabolism slows way down. In fact, their respiration rate, or breathing, drops almost to zero. So whether or not they “sleep” like we do is open to question, but they certainly take it easy at times.