Every gerund has the same form - verb + -ing. So, having that in mind, the word <em>sleeping </em>is used as a gerund in this sentence, but it is also a subject of the sentence.
Where is the excerpt? If we can't see it how can we help you!
The reader can infer that the author believes social networking sites