According to this, you don't have to be working as there are several catagories for applying for a res. permit
The Thai Immigration Bureau has recently (october 2003) announced quotas for all expatriates applying for residence permits at 100 persons per nationality. All foreigners may qualify to apply for a residence permit if he/she
1. Holds a passport of his/her current nationality, which was granted a Non-Immigrant visa and the individual has been permitted to stay in Thailand for at least
3 consecutive years on a 1-year visa extension basis up to the application submission date.
2. Has personal qualifications that meet one or more of the following categories:
1)
Investment category (minumum 3 - 10 Mil. Baht investment in Thailand)
2)
Working/ Business category
3)
Support a family or
Humanity Reasons category: He/she must have relationship with a Thai citizen or an alien who already possesses a residence permit as the
followings:
- A legal husband or wife
- A legal father or mother
- A child who is under 20 years of age up to the submission date of application and must be single
4)
Expert / academics category
5) Other categories