It is narrated from Sayyiduna Abu Hurayrah (may Allah be pleased with him) that the Messenger of Allah (peace and blessings be upon him) said: "Were it not that I would be placing hardship on my Ummah, I would have commanded them to delay the Isha prayer and to use the miswak with every prayer."
(b) Imam al-Shafi'i (may Allah have mercy on him) says: In this hadith there is evidence that the miswak is not obligatory but optional; had it been obligatory, he (peace and blessings be upon him) would have commanded the Companions (to use the miswak) even if it caused them hardship.
Hadith Referenceالسنن الكبرى للبيهقي / كتاب الطهارة / 145