During libel proceedings on Wednesday, Belfast’s High Court heard how Dr Jessen sent an initial tweet on 23 December 2019 followed by other “aggravating” posts.
Ms Foster told the court the incident came at a particularly stressful time when she was involved in talks to resurrect the power-sharing government in the region.
She said she felt the rumour of the affair with a close protection officer, which she described as having emerged online from anonymous accounts before the tweet by Dr Jessen – best known for the Embarrassing Bodies TV show on Channel 4 – was designed to unsettle her during a crucial period.
"I think the attack on me personally and my marriage was meant to destabilise me at a very critical time," she told the court.
"It was meant to destabilise me and thereby destabilise the negotiations as well. I have no proof of that, but I just think the timing of it is very significant given when it came."
Ms Foster said she had to sit down with her two elder children – then aged 17 and 19 – to talk to them about it, as well as her elderly mother, then aged 85, and assure them the rumour was not true, adding: "It was not a conversation that I would like to repeat."
Asked how she felt about it, she replied: “Very, very upset.”
She added: “Having to speak to my husband and explain to him what had happened, because this gentleman has a large following, so this was going to go quite far and wide."
"It was very humiliating, I have to say, to see that the relationship that is most important to me had been trashed, if you like, and got put out there in the public domain in that fashion.
"There wasn't much sleep on the night of 23 December.
"I spoke to my husband and we decided we needed to take action because this was only going to continue to grow. I therefore contacted my solicitor and asked him to take action in relation to the matter."
The court heard Dr Jessen responded to a tweet by solicitor Paul Tweed on 24 December, putting him on notice about the content of the tweet, with the short form "lol", which means "laughing out loud".
He then responded to an email from the solicitor on 7 January and removed the tweet.
The court heard there was a "further aggravating tweet" on 26 December in which Dr Jessen wrote he was being compared to Barbra Streisand, saying: "this gay boy’s life cannot get any better", which was accompanied by exclamation marks and a number of emojis.
This was described by Mrs Foster's legal team as a "sneering tweet".
However, Dr Jessen has not responded to correspondence since, the court heard.
Dr Jessen was described in court as a medical doctor who practices as a GP on Harley Street in London. He has 311,000 followers on Twitter.
His initial tweet on 23 December was retweeted more than 500 times, as well as prompting a thread of discussion described in court as "pretty unpleasant", before it was deleted.
David Ringland QC, acting for Ms Foster, said: "We are talking about huge publication in this case."
Mr Justice McAlinden said he would reserve his decision and produce a written judgment on the matter “as soon as possible”.
Dr Jessen’s tweet on 23 December 2019 also referred to Ms Foster as "the sanctity of marriage preaching woman", adding: "It always comes back to bite them on the arse in the end."
The DUP had in the past opposed attempts to allow same-sex marriage in Northern Ireland.
It was extended to the region following legislation at Westminster while Stormont was suspended.
Asked during the libel proceedings if she was homophobic, Ms Foster responded “no” and later added: “I get very distressed when people do actually call me a homophobe because that's something I am not.”
Additional reporting by Press Association