The explanation is simple: an '-ing' verb form is called a gerund only when it is acting as a noun. A sleeping habit of mine is to roll around in bed. -- 'Sleeping' is an adjective: it modifies the noun 'habit'.
New words, one handy idiom, and a 2-minute quiz — delivered to your inbox to keep your streak alive.