I'm not sure what you mean here. Can you perhaps provide an example of a battle that continued for multiple days without pause (if that is what you mean)? I cannot think of any in my period. An engagement might be preceded by days of low-level skirmishing or followed by days of pursuit, and obviously sieges could go on for months, but I cannot see how a field battle could be sustained for multiple days without rest. A few minutes of sustained hand-to-hand combat is exhausting, let alone hours and hours on end; by the end of a day of hard fighting, even the victorious troops would be gassed. Should the day end with the issue unresolved, it is very, very likely that the armies would separate and use the night to eat, rest, and tend to wounds - night combat on a large scale was very, very unusual - but I honestly cannot think of an example where a major field battle resulted in a tie and a break for night.
If I am misinterpreting your question, please say so and I will have another go at it.
They would sleep, at night! excluding sentinels, patrols and the likes.
Battles in the Ancient world wold rarely last more than 1 day or the initial engagement, there wer some but they were the exception not the rule.
One important thing to understand about ancient warfare, and not so ancient as this was still case even during the American Civil War, is that you would only fight with day light.
In a world without artificial light and very limited communication means at the battle front (may be some flags and mostly yielding orders) any night operations were almost useless. Fighting would stop with darkness and renewed at dawn if it was the case.
You may also note that figting did not last hours like in the 20th century with people shooting at each other for hours. Ancient battles were battles of physical contact, hand to hand, and that is an extenuating exercise. Engagements may last 2-4 hrs and people would be worn out after that; most likely outcome in the antiquity was that one of the armies gave way, collapsed and run being routed. That simple. Once the one of the wing, or the center of a main body collapsed confusion, enemy penetration and panic would spread leading to a "run for your life" scenario. Hence the advantage of trained and disciplined troops like the Roman Legions in both offensive and defensive actions.
This does not mean that night actions did not take place but they were certainly a very small percentage. Equally fighting was normally resumed with the first lights after having got a good breakfast (yes, you need energy for what is coming) and water (equally important). Chronicles of the Battle of Cannae describe how hard the thirst became after hours of figting. You just can't leave the fight or even access your cantine while infantry with spears and swords are pushing at you, it will have to wait.