Sleep trouble before exams is rarely a purely physical problem. More often, the feeling that many things are still unfinished arrives all at once at bedtime. So the response is not to force sleep but to reduce that sense of incompleteness.
The first thing that works is fixing your wake time rather than your bedtime. Get up at the same time even after a bad night. The point is to stabilise your body clock, not to recover the hours. If you are sleepy during the day, keep any nap to around twenty minutes so that it does not steal from the next night.
The second is to write things down. Spend five minutes before bed listing what tomorrow involves and what is worrying you. This is not a productivity technique; it moves the looping thoughts out of your head. Many people fall asleep noticeably faster after this step.
The third is to stop doing new questions and stop reading anything that invites comparison in the hour before bed. Frustration from hard problems and comparison on social media both raise alertness, and alertness is the opposite of falling asleep. Use that time for light organising instead: clear the desk, lay out what you need for the next day.
If none of this helps after two weeks, or if it is clearly affecting your attendance, eating or general mood, seek professional support — a school social worker, a guidance teacher or your family doctor are all reasonable places to start. What is written here is general information and is not medical or psychological advice.