The 5 daily prayers were prescribed to the Prophet Muhammad (pbuh) during the "Night Journey" known as the "Isra and Mi'raj". As described in a long hadith, this is the night where the Prophet Muhammad (pbuh) traveled from Makkah to Jerusalem and than up to the Heavens where God had prescribed to him 50 prayers per day. As the Prophet (pbuh) came down, Moses asked him what God had enjoined upon his nation and he told him 50 prayers, Moses told him go back and beg for reduction. The Prophet went back and forth several times and at the end it was 5 daily prayers, each being credit as ten. God does not need us to pray, it won't decrease or increase his dominion in any kind of way, the prayer is a benefit to and for us.