There is no official rule for this, although there is a rule of thumb according to CBP. This is that if one spends X days in the US on the VWP, one should wait at least X+1 days before seeking to re-enter the US. Quoting from this Travel.SE answer on the topic:
the important paragraph reads:
The Visa Waiver Program doesn't work that way. If he decides to use the Visa Waiver Program (ESTA); maximum stay is 90 days and he needs to allow adequate time between visits. The rule of thumb is if he is in the US for 90 days; should be out of the U.S. for 91 days before returning.