Jannik Sinner has struggled with cramps and extreme heat before securing a 4-6, 6-3, 6-4, 6-4 victory at the Australian Open.