I agree with Ticklish. The thickening of the endometrial lining happens mostly after O as a result of the progesterone. My FS has told me that the Clomid causes an increased secretion of LH and FSH which then leads to O. The Clomid apparently works by blocking oestrogen receptors in the brain (hypothalamus and pituitary). After O progesterone dominates the luteal phase of the cycle and the lining then thickens in preparation for implantation. I too have read that after several cycles the Clomid can cause thinning of the lining. I guess this would be something that would be assessed by your FS if you needed to do additional cycles. I'm sure this doesn't happen to everyone. My FS has also told me that if we don't have success with the Clomid I may then have to move onto FSH injections and she also mentioned the possibility of ovarian drilling (sounds scary huh!). Anyway sounds like there are other options if the Clomid doesn't work or if I can't use it after a period of time.
I hope this helps!