Upvote:4
Yes, no problem. You can exit and re-enter during the 90 day limit, and in fact if you leave North America (USA, Canada, Mexico) the 90 day period resets.
You just need to make sure your ESTA is valid for the entire period as well (they're usually valid for 2 years) and you have evidence of your travel plans and finances are in order.