I agree with all the responses above, however...

We walked Maho Beach all the time having once owned at Caravanserai and then later on, exchanging into Royal Islander. We love the Maho area and the restaurants on the new Alegria side. I always felt uncomfortable but we weren't much later than 10p.m. when we would make our trek across the sand and did we ever move fast. We stuck close to the road and HOOFED IT!
There was also a lot of road traffic that time of night so that was a bit of comfort.

Like anywhere in the world, when you travel you have to be aware when you are out and about.

Would I walk the stretch of sand in Maho again at 9 or 10p.m. at night? I have to say, Yes...but not any later. No way.

Hope that info helps along with the other posters on this issue. There is safety in numbers but the final decision on your safety is up to you.