Myopia can be caused by too much of something called "nearwork." You can read more about some of the theories at this Wikipedia page:
Myopia - Wikipedia, the free encyclopedia
I think computer work may be worse than looking at books, but you might want to talk to an eye doctor to see if that's true or not.