If a professor asks to write your own recommendation letter, is it really a good opportunity to grab? There may be multiple reasons for him to ask this, but I want to know what if you write your own LOR? What are the pros and cons, keeping in mind the person who is reading it?
In the U.S., in mathematics, this might be a bad idea. The "voice" of letters of recommendation surely needs to be that of a relatively senior person, writing to the relatively senior people who will be reading the letters.
While it may be true in principle, or approximately, that one knows one's own best features better than anyone else, in practice this is often not quite the case. That is, more senior people may value, and observe, longer-term virtues that are not well understood by a very junior person. At the same time, things highly valued by a novice may be viewed as transient by a more senior person.
(Of course, there is nothing that prevents more senior people from being immature and "clueless", etc., and that leads to unhelpful letters, obviously.)
Having come across situations like this, I urge you to proceed with caution. Try to judge how serious the professor is about the LoR; is (s)he dismissive of your application? If so, start looking for another letter immediately. The only thing worse than a weak LoR is a casual, flippant LoR.
Similarly, if the professor seems unwilling to put in much effort, there is a chance that the letter written by you goes through with minor/no changes. This is not a good situation, because you are likely to over/under sell yourself, and the evaluators may quickly pick up that it's written by a student. There is a certain authority when a senior academic writes that is hard to mimic. A sub-par job will create a poor impression of you, your institute and maybe your country.
It is also possible, that the professor is busy and wants to save some time by getting you to put down a draft, which (s)he will work on and mould into shape. In this case (not infrequent), the final product may be hard for you to recognise, indicating the effort that has gone into it. This is a good option- since it's basically two minds working on it, so there's less chance of something getting missed out by accident.
Ultimately, you need to use your judgement and maybe the departmental grapevine to decide which of these is most likely to be your case.