In order to track sleep hours with Google Fit you will either need a compatible sleep tracking wearable or sleep monitoring app.
Recommended sleep monitoring application
For the best experience we recommend using the Sleep as Android application to track your sleep hours. If your wearable already tracks your sleep hours to Google Fit you can simply connect your sleep hours.
You can download and connect Sleep as Android here
For instructions on how to connect Sleep as Android to Google Fit see this article