Pull off MA 6 and after a short walk you'll find yourself surrounded by dunes as far as you can see. There's no one trail (keep walking relatively straight and you'll get to a lovely beach) so you can wander the sand hills as you wish. Make sure to bring lots of sunscreen and note the location where you began your walk.
There are just a few spots to park along MA 6. It's accessible by bike (no bike rack, but a few road signs if you want to chance it) or a very long walk from town.