A friend told me he will make use of nights when he can't sleep, to learn something from computer programming, a foreign language, and even car repair, all of which can be leaned online. This is actually quite good, but I rarely suffer from insomnia. Even if I can't sleep, I actually won't look at anything. I'll quietly clear my mind, then later on I can gradually fall asleep.