CONSUMER REPORTS — Tossing and turning all night long? If you’re having trouble sleeping, your doctor may suggest a drug or supplement to temporarily east your insomnia.

But, what are the long-term risks of those medications? Consumer Reports helps identify the causes of sleeplessness and suggests the most effective ways to treat it.

The truth is that not sleeping enough isn’t just annoying, it can actually contribute to serious health problems, including diabetes, high blood pressure, weight gain and depression.

For short-term sleep problems, your healthcare provider may suggest a drug or supplement to help you catch some ZZZ’s.

If your doctor prescribes sleep drugs, it may increase your sleep by only about 20 to 30 minutes.

All prescription sleep meds come with risks, including drowsiness the next day. Some have also been linked to sleepwalking and other odd nightmare behavior.

So, you should take the lowest dose for the shortest time possible.

Another option is an over-the-counter sleep drug, which can also cause drowsiness the next day and may be habit-forming when taken long term.

If sleeping pills worry you, you might be more comfortable taking the popular supplement melatonin. But there’s little evidence that it actually works unless you have jet lag.

An increasingly popular choice is CBD, which has shown to cause mild side effects and isn’t addictive. But some research suggests that its effect on sleep might lessen with extended use.

Because CBD is inconsistently regulated, you should ask the seller or manufacturer for the Certificate of Analysis, which shows the results from the company’s own tests.

And if you suffer from chronic sleep problems, Consumer Reports suggests cognitive behavioral therapy for insomnia.

With CBT-I, you work with a therapist to help fix bad habits, like using your smartphone too close before bedtime.

A therapist can also give you tips to help improve your sleep environment, like keeping your room dark and cool enough.

Consumer Reports also wants to remind you that no sleep drug should ever be taking with alcohol, opioids, or any other sedative.