Research has linked superstrict dieting to anxiety, overeating, and even weight gain. Why does it backfire? Often, the more weight you lose, the more your body fights back by slowing your metabolism. But even more important is the psychology behind it—the pressure to eat perfectly versus the permission to enjoy an occasional treat. A diet that includes some kind of release valve—a way to fudge on the plan without giving up entirely—might work better than one that doesn’t.

The solution, say experts, is to enjoy an occasional treat. Just be sure to use these guidelines to help keep your cheating in check.

Know when to cheat. If you’re regularly working out hard and seriously watching your eating, you can keep your metabolism revved (and your body better nourished) by cheating once in a while.

Follow the 90-10 rule. To avoid carrying home “souvenir pounds,” eat right 90 percent of the time and use the other 10 percent to cheat. That can mean one little cheat each day or one major cheat each week. (Follow this same ratio at home, too.)

Choose the right cheat. If you have a very specific craving, indulge it. If not, enjoy a cheat food that replaces whatever you’ve been restricting most, whether that’s fat or carbs or both.

Use your cheat as fuel. Have your cheat meal the day before a tough workout or competitive event. The calories can enhance your training session—and the training session can torch those extra calories. It’s a win-win.