There is no legal impediment to receiving compensation from somebody for caring for them. This is called a family care agreement. You will need to claim the income on your taxes, however if you are able to write off a number of expenses you may have little or no tax liability.
It is very important that you see an elder law attorney and have him draft a family caregiver agreement for you. In fact, these agreements are great ways to protect assets for the elderly. For example, and elderly person wants to give away 20,000 as a gift to a child. However, a gift results in a penalty if the senior needs to be admitted to a nursing home within 5 years. If that money goes to a child through a family caregiver agreement then it is compensation for services instead of a gift and there is no penalty.