You can change the beneficiary of a 529 plan quite easily, without tax or penalty when the new beneficiary is a "member of the beneficiary's family", as defined by the IRS.
Luckily, the IRS has a pretty expansive definition of "family":
Straight from the IRS (bolding is mine, and I've added some comments):
The beneficiary's family includes the beneficiary's spouse and the following other relatives of the beneficiary:
1) Son, daughter, stepchild, foster child, adopted child, or a descendant of any of them
Look at that, you can sit tight and wait for grandkids to arrive on the scene!
2) Brother, sister, stepbrother, or stepsister
Moving money between siblings is a popular choice...consider this if you're in a state that awards tax deductions on a "per-beneficiary" basis. Not sure if you are? Our AboveBoard College Savings Guide will tell you.
3) Father or mother or ancestor of either
Feel like going back to school for fun during retirement? Maybe get that Master's Degree in something you love? Awesome, you can use any left over 529 plan money.
4) Stepfather or stepmother
5) Son or daughter of a brother or sister
Nieces & nephews are included!
6) Brother or sister of father or mother
Aunts & uncles are included!
7) Son-in-law, daughter-in-law, father-in-law, mother-in-law, brother-in-law, or sister-in-law
Feel like giving money to your kid's mother-in-law? You can if you want!
8) The spouse of any individual listed above
9) First cousin