It is known that Arab pagans also prayed five times a day and even fasted 30 days.
Here is video about that: https://www.youtube.com/watch?v=YinC3Y9fSsQ
So it is very likely that
Mohamed did just pick up those rituals.
Nope ElToro ..no.,
THERE WAS NO MUHAMMAD IN EARLY ISLAM., "Muhammad just a title and it means "Praiseworthy Person with leadership Qualities"
.. Anyone could be called "Muhammad"
Albert Einstein was as "Muhammad" of Theory of Relativity
Charles Darwin was a "Muhammad" of Theory of Evolution..
The First preacher of Islam who was good man essentially told his congregation in Arabian peninsula "People are fools to pray Idols and consider Persons such as Jesus as Son of God"
That is all what first Muhammad .. the first preacher of Islam preached for 5 or so years in in the initial Islam.,
After that whole load nonsense is added in to Quran tons of junk is added in hadith from various sources which people consider those stories as Words of Allah/god and Sunnah of Prophet ...
So again...THERE WAS NO SINGLE MUHAMMAD IN ISLAM ..