If you need to stay afk (away from keyboard) in game, you can start resting some experience points.
Resting system is activated if you sit down (or start levitate if you have wings).
Every 2 hours, you will receive 20 minutes of spirit of genie up to 60 minutes. But note that if you do relog, these rested minutes will be removed. There is only one exception - if you bought Spirit of genie from Power up store in past, game will not recognize if you have rested minutes or bought and so in such case, your rested spirit of genie will be permanent (resp. until you use them).
If you are in resting mode, you get some experience points approximately every 14,5 seconds based on your level and if you are premium user (doesn't matter what type of premium you have)
Here you can easily see how much exp you can get for specific amount of time - but note that 14,5 seconds is really approximate time, so experiences in table will not be exact but still very close to reality.