Any person with a valid Social Security number can be the beneficiary of a 529 plan. The beneficiary and the account owner don’t need to be related. An account owner can open a 529 plan for themselves or a family member or friend.
An account owner may change the beneficiary at any time. There are no tax consequences if you change the beneficiary to a family member of the current beneficiary. However, you should consult with your tax professional regarding your specific circumstances.