It's been proven that regular excercise improve sleep quality. Stress is a common cause of sleep disorders. Excercises release stress. Go to a gym or go out for a run 3 times a week. I bet you that you will sleep better.
That's proabaly because you are worried about assignments and exams. Are you away from home? That can also add to your feeling of lonliness and a sense of helplessness.
Most students away from home experence this kind of feelings. It will go away. Hang in there.