Finally, the therapy aims to undermine self-defeating assumptions about sleep, like “Without a good night’s sleep, I can’t function the next day” or “Medication is probably the only solution to sleeplessness.” The program prompts people to log in daily and record each night’s sleep in some detail; it then tailors weekly sessions based on those entries.

Ms. Love Callon’s problem, for example, still wakes up in the middle of the night, at 4 a.m. or thereabouts. The online program, she said, instructed her to get out of bed when that happened, and sit and read for 40 minutes — which is more likely to induce sleepiness than, say, shopping online. “And it has worked,” she said. “I get drowsy while reading and have been able to go back to bed and fall asleep.”

The research team tracked the participants, assessing their sleep quality every several months, using standardized questionnaires. After a year, 57 percent of the people using the online therapy program were sleeping normally, compared with 27 percent of those who had gotten only advice and education.

“We continued to see improvement from the six-month assessment through the end of the year, even though people had stopped using the program,” Dr. Ritterband said. “So, that’s a very good sign.”

According to Dr. John Torous, co-director of the digital psychiatry program at Beth Israel Deaconess Medical Center and Harvard Medical School, there are about a dozen online programs on the market using cognitive behavior therapy techniques — for a variety of conditions, including depression — which also have rigorous evidence behind them.

“There are maybe ten thousand or so mental apps out there, and the number is increasing way faster than the evidence base,” Dr. Torous said, “so it’s good to see someone doing careful studies.”

Dr. Torous said the one caveat for all of them is adherence. “When you stop paying people to be in a study, when they stop getting reminder phone calls, they often stop doing it,” he said. “It’s like a gym membership that way; people may do it twice and then let it go.”