Moses stayed on the mountain for 40 days and nights , a period in which he received the Ten Commandments directly from God .
Moses was up the mountain for forty days and forty nights .