Warring factions in Sudan have agreed to a 72-hour ceasefire starting on Tuesday.