By Anahad O’Connor

New York Times News Service

Q: I don’t have a problem with falling asleep, but I do have a problem with the duration. How can I prolong my sleep beyond four hours? I end up wide awake after three or four hours of sleep.

A: Many people occasionally wake up in the middle of the night and find themselves unable to get back to sleep. But if it happens often, and you are consistently tired and not functioning well during the day, that indicates a problem, said Dr. Meir Kryger, a professor at Yale School of Medicine and the author of “The iGuide to Sleep.”

Stressful events, a loud pet or a snoring bedmate may be to blame, or the problem could be a medical issue such as a cough, sleep apnea or getting up to urinate, which could be a sign of diabetes.

Worrying about being awake only makes the problem worse. “We see that in patients who’ve had insomnia for a while,” Kryger said. “They wake up and become so angry, frustrated and aroused that they can’t fall asleep.”

In some cases better habits can help. Nicotine or alcohol levels fall during sleep and can cause people to awaken, so quitting smoking or avoiding alcoholic beverages, especially before bedtime, can help.