Sex educator Allison Moon is author of Girl Sex 101.

Breakup sex can seem like a perfect solution to a sad situation: You get your sexual needs met by someone who knows you well, and forget about your heartache for a few hours.

But I've found that breakup sex is usually not worth the momentary indulgence. The last time I did it, a few weeks post-split, I was standing with my ex after a dinner as friends, when we looked at each other and he said, "Do you want to come over?" I went with my immediate impulse, because I still missed him. I wasn't ready to say goodbye.

Of course, after a few nights of trying to have it both ways – not back together, but too emotionally invested to be casual friends with benefits – we concluded that breakup sex was leaving us in limbo.

There's the rub. Breakup sex is probably going to feel good in the moment, but for me, it has made it harder than necessary to get over my ex.

I spoke with several dating gurus who agreed that breakup sex is tricky territory. "It's not uncommon for people to hook up following a tough breakup talk, because there's an intimacy built by having an honest talk," relationship expert Andrea Syrtash, author of "He's Just Not Your Type (And That's a Good Thing)," told me. Althugh it's seductive to get it on "without the stress, pressure or strings that were attached when you were together," she cautioned that instant gratification can be more painful than it's worth. "Very rarely are two people on the exact same page following a breakup. In most cases, one person is more invested in making the relationship work," Syrtash said.

Sex educator Allison Moon, author of Girl Sex 101, likens a relationship ending to an addict's withdrawal symptoms. "When you're breaking up with someone, you're essentially going through detox," Moon explained. "You need to level out your blood chemistry and keep from getting your 'fix.' Cold turkey is better. Sex isn't methadone or a nicotine patch. It's a full fix, and you can't get 'clean' if you keep visiting your dealer."

However, if you're able to be okay with having ex sex and then going on your single merry way, then go ahead, says dating coach Erin Tillman. "If someone is truly ready to move on emotionally, one final sexual experience could be seen as a sweet and sexy send-off into the land of singlehood," Tillman told me.

She suggested some questions to ask yourself before getting busy with your former flame: "What do I honestly want from sex with my ex? What is my end goal? Do I still have feelings for them? Would I be upset if my ex wanted nothing to do with me after our sex session?"

You also need to take your ex's feelings into consideration. If your ex is still sobbing every time they think of you, it's not fair to them to engage in sex, even if they say they're okay with it. They may be harboring dreams of reconciling while you're revising your online dating profiles.

There are, of course, exceptions. "The only case where breakup sex can help you get over the breakup is if you and your ex broke up because you had little sexual chemistry," Syrtash concedes. "In that case, you may be reminded of how incompatible you are."

Or wait a little while before you hop into bed again. Moon says that, to protect your heart, you essentially have two options: "Either bang as your goodbye and call it quits, or wait until you've had a few other escapades with new people and you feel fully separate and healed from the relationship; then you can have sex as friends."

But never assume that breakup sex will be the ticket to winning back your ex. As dating coach and author Evan Marc Katz puts it: "In a good relationship, sex is the icing on the cake; it's not the cake itself. You need to have good sex to have a good relationship, but good sex isn't what keeps a bad relationship alive. The idea that you're going to sleep your way back into (someone's) heart seems like wishful thinking, because in the clear light of day the same problems that caused you to break up remain."

Breakups are hard – there's no getting around that, even with orgasms. If it takes most people six weeks to three months to get over a breakup, why risk prolonging your misery? Even if you're not quite ready for a new fling, don't fool yourself into thinking the source of your pain – your ex – can be the one to heal it by getting naked with them.