Go to My Account, open Responsible Social Gameplay and choose Activity Reminder. You can pick a reminder every 1, 2 or 3 hours.
When it pops up, your game pauses and you'll see how long you've been playing, so you can decide whether to stop or keep going.
