to fail miserably
—If you don’t practice enough before giving your speech, you’ll fall flat on your face in front of everyone.
When the Israelites reached the end of their journey through the wilderness to the Promised Land, before entering Canaan, they camped in the plains of Moab. Balak, King of Moab, was afraid of them and called on Balaam, a pagan diviner, to curse them. God told Balaam not to do it, and when Balaam rode his donkey to see the king, God’s angel blocked his path. Though Balaam could not see the angel, the donkey could and turned away. Balaam was angry and beat the donkey three times. God gave the donkey the ability to speak, and he asked Balaam why he had beaten him.
Then the Lord opened Balaam’s eyes, and he saw the angel of the Lord standing in the way with his sword drawn in his hand; so he bowed his head and threw himself down with his face to the ground [fell flat on his face—KJV]. (Numbers 22:31)
When Balaam “fell flat on his face” it was to show humility in the presence of a great power, which is much different from the current meaning of the phrase.
God allowed Balaam to continue his journey to see Balak but told him to speak only the words God would say to him. Therefore, Balaam spoke blessings on the Isarelites, rather than curses.