Allah created the heavens and the earth and everything in between them in six 'days' as He says:
"And indeed We created the heavens and the earth and all between them in six days and nothing of fatigue touched Us" - Qur'an 50:38
Thus, Muslims do not believe that Allah got tired from creating the heavens and earth and was in need of resting, as He is far above this and should not be likened to His creation who get fatigued and need food and sleep. Allah states in the Qur'an that the heavens and earth were once one, and then He split them:
"Have not those who disbelieve known that the heavens and the earth were joined together as one united piece, then We parted them? And We have made from water every living thing. Will they not then believe?" - Qur'an 21:30
Muslims believe that Allah created the Heavens and the Earth in the following way:
"Say (O Muhammad): 'Do you verily disbelieve in Him Who created the earth in two Days? And you set up rivals (in worship) with Him? That is the Lord of the 'Aalameen (mankind, jinn and all that exists).He placed therein (i.e. the earth) firm mountains from above it, and He blessed it, and measured therein its sustenance (for its dwellers) in four Days equal (i.e. all these four 'days' were equal in the length of time) for all those who ask (about its creation).
Then He rose over (Istawa) towards the heaven when it was smoke, and said to it and to the earth: 'Come both of you willingly or unwillingly.' They both said: 'We come willingly.'
Then He completed and finished from their creation (as) seven heavens in two Days and He made in each heaven its affair. And We adorned the nearest (lowest) heaven with lamps (stars) to be an adornment as well as to guard (from the devils by using them as missiles against the devils). Such is the Decree of Him, the All Mighty, the All Knower" - Qur'an 41:9-12