At least some content in this article is derived from information featured in the latest update of Pottermore. As such, spoilers will be present within the article. Please take care when reading this article if you have not yet been through the latest update.
"This purple potion will make the drinker drowsy at once and help them get some peace and rest."
As Harry only drank a portion of it at first and woke up earlier than the others had expected, it is likely the amount of the potion taken is proportional to the amount of time the drinker sleeps.
Although the "In the Story" links on the sidebar identify this potion as the "Sleeping Draught", a potion with which it shares many similarities, the potion is a collectible item and it is called "Potion for Dreamless Sleep" in the trunk description.