Sleep is perhaps the most mysterious of all human activities. No one can really define its biological function — that is, why it is restful and necessary — or come up with a foolproof recipe for a perfect night's rest. 

Soldiers, shift workers, medical residents, flight attendants, pilots and most parents of small children suffer from insufficient sleep. Parents of adolescents who drive cars at night or stay out late, for whatever reason, may also find themselves unable to sleep. If you're older, you are likely to sleep less soundly. You need just as much sleep, but it's harder to get it in one stretch. You may have trouble falling asleep or staying asleep.

But is it insomnia?

There's a lot of buzz on television and in other media these days about insomnia. Several companies — which some doctors have taken to calling the "sleep-industrial complex" — have been busy persuading you that lack of sleep is an epidemic peculiar to modern life, as well as a serious health risk, and that the first logical step is to spend $1,500 on a mattress. (Everybody needs a comfortable place to sleep, but an expensive bed is not likely to solve your problems. Millions of people sleep well on mats on the floor.) And seductive ads for sleeping pills assure you that drugs are the answer — also not so.

Commonly what plagues older people is a period of wakefulness in the middle of the night. You fall asleep easily, but at 3 a.m. you're wide awake. In fact, this may just be a normal function of human sleep rhythm, as I remind myself when this happens to me. It's more convenient to sleep eight hours straight, but not harmful if you don't.

"Segmented sleep" is such a well-known pattern that many languages have names for "first sleep" and "second sleep." In medieval times, people used the waking interval to talk with their bed partner, make love while the children slept, or pray. Good ideas, but I find that reading is the most relaxing. After half an hour or so I fall asleep once more. [How Much Sleep Should You Get? New Recommendations Released]

Falling back into blissful sleep

I bring this up because in matters of insomnia, staying calm is important. Anxiety can make insomnia worse. Instead, try to retreat from your problems at bedtime. Read or listen to music — some quiet activity that relaxes you.

Limit alcohol at night, and cut down on caffeine during the day. And make your bedroom sleep-friendly. Keep it dark, quiet and use it only for sleep and sex. [Mindfulness Meditation May Help Older Adults Sleep Better]

In most cases, such practical self-help (as opposed to medical approaches) does the trick. But if this doesn't help, and sleep deprivation is ruining your ability to enjoy life, you may need to go further.

Talk to your doctor about going to a sleep disorders center, or trying cognitive behavioral therapy for insomnia. CBT for insomnia helps people recognize and change poor sleep habits. People often start by keeping a sleep diary. With the therapist's help, patients identify bad sleep habits, such as taking long naps, and gradually replace them with a healthy sleep schedule. You might also consider a sleeping pill, although most are recommended only for short-term use. Keep experimenting until you find what works for you.

Read more from berkeleywellness.com: A Wakeup Call on Sleep Aids, Exercise and Sleep, and How Much Sleep Do You Need?

Copyright 2015 LiveScience, a Purch company. All rights reserved. This material may not be published, broadcast, rewritten or redistributed.