Here's your text with some changes:
Once upon a time, there lived a man named Merlin. He was so wise that people called him a wizard. One day he was traveling. He was dressed like a beggar. It got dark. There was no inn in the village. He stopped at a house. "Could I stay here tonight?" asked Merlin. The farmer welcomed him. His wife gave him a little milk and bread. Merlin was grateful to them.
- I've changed the wording of the first sentence to the standard opening line for fairy tales and folk tales.
- You can spell the names of people in your own stories however you like, but the usual spelling of Merlin is without the 'e'.
- 'Traveling' is fine spelt with one 'l' if you want to use American spelling conventions.
- 'Stop at' is more normal than 'stop by' in modern English.
- In the last line, if 'them' is the farmer and his wife, the phrase you need is 'grateful to'.
Finally, if you want to improve your writing style, you might want to think about joining some of those very short sentences together using conjunctions.
And remember that it's better to put this kind of post in the Notebook section because it's much easier to make and to see corrections there.
Otherwise, well done. A nice start to a story!