All of us will experience some sleeping problems but not all types of problems to fall asleep or staying asleep need a professional treatment.
Most people have rather wrong expectations concerning healthly sleep or the amount of sleep the need to feel refreshed and healthy next day. So they swallow a lot of sleeping pills to feel "better" and relaxed - but this can contribute to a severe disturbance of normal sleeping patterns.
So before considering any medication you should first learn more about your personal need for sleep and normal sleeping patterns.
The best method to evaluate your demand of sleep is to examine whether you feel refreshed after a normal nights sleep.
If you got at least 5-8 hours sleep and feel o.K. the next morning, to not worry about any type of relevant sleeping problem. Even if you have some days and nights without the ability to sleep the whole night, you do not need a further medical examination.