People who have trouble falling asleep and staying asleep may want to seek advice from a doctor and avoid long-term use of sleeping pills, medical experts advise.