Rest

Rest is a device that allows more casual gamers to stay somewhat on par with other players, as to character level. It's also a clever device to encourage less-active players to keep their accounts, making players want to come back and play some more after some time away from the game. Rest also adds more value to the subscription fee. In light of the controversy of game addiction, rest also gives players reason to cease play. Blizzard has also stated that World of Warcraft play should be taken in moderation according to loading screen tips.

Execute the following script to display the amount of Rested XP your character has earned: /script p="player";x=UnitXP(p);m=UnitXPMax(p);r=GetXPExhaustion;if -1==(r or -1)then t="No rest."else t="Rest: "..(math.floor(20*r/m+0.5)).." bubbles ("if r+x<m then t=t..r else t=t.."level +"..(r+x-m)end t=t.."XP)"end;DEFAULT_CHAT_FRAME:AddMessage(t)

A line will be added to your chat window displaying something similar one of these:
 * No rest.
 * Rest: 12 bubbles (23456XP)
 * Rest: 24 bubbles (level + 43251XP)

Storing up rest
While in an inn or anywhere in a capital city, your player portrait will begin to glow and your level circle will say zzz, indicating that you are resting. If you log off here, you will continue to rest while offline.

One bubble of rested XP (5% of your current level) is earned for every 8 hours spent resting. A maximum of 30 bubbles (150% of your current level) may be earned. In other words, you can leave your character resting in an inn or capital city for up to 10 days (without gaining experience) before you earn the maximum amount of rest state, and a resting character stores up one full level of rest in 160 hours (6.67 days).

Keep in mind that the rate of gain of rested bonus, and the maximum amount of rested bonus, are based on your current level, not the level at which you'll be when your rested bonus is fully consumed. At certain points in the levelling process, the XP requirements for your next level can be as much as double the requirements for your current level -- e.g., it requires about half as many XP to get from level 59 to level 60 as it does to get from level 60 to level 61. If your XP bar is nearly at the end of level 59, and you log out for 10 days, your XP bonus will only stretch about 3/4 of the way through level 60. (Some mods that show your rested bonus through the next level may not take this into account, and give you overly optimistic data.)

You also become rested while logged off in the wilderness, but the accumulation is slower. When logged off "outside," rest is gained at one fourth the rate in an inn, or one bar every 32 hours.

It may also be possible to engage the resting state while in ghost form, or dead.

Consuming rest
When rested, your XP bar will turn blue, and a notch will appear indicating exactly how rested you are. (If there isn't enough room to show it on your current XP bar, it will show up after you gain a level.) You will earn double XP from killing monsters, mining ore nodes, gathering herbs, collecting archaeology fragments, and opening chests while rested until your XP bar fills to the notch. At that point, the message
 * You feel normal.

will appear and you will resume normal XP gains.

When you are rested and you gain eligible XP, in the combat log it may say something like
 * 120 XP (+60 rested XP).

This means you received a total of 120 XP: 60 XP for the action, and an extra 60 rested XP.

The amount of rested bonus consumed is equal to the total amount of XP gained. In the example above, 120 rested bonus would be used, not 60.

Experience earned from exploration and quests does not consume the rested bonus. When XP is gained from these sources, the rest marker will be moved forward by as many XP as you gain from the exploration or quest, indicating that your rested reserve remains unchanged. Also if you're using the Recruit-A-Friend function, the rest marker will be pushed forward and your rested XP will not be consumed.

Further information
When you are about 5th or 6th level, you will receive quests to go to another town area. This town is where the first inn is available to a new character. Put another way, until you get your first 5 or 6 levels out of the way you will not happen across an inn and so you will have to 'camp out' when you logout, accumulating rest at the slower "wilderness" rate. It is easy enough to get these first five levels, so it is good to finish those quests and hurry over to the inn.

At this inn, and at all other inns that you find, you will find an innkeeper, who can bind your hearthstone to that inn. Activating your hearthstone you will move your character to that bound inn. This is useful for rapid or unexpected logout situations; you can activate your hearthstone and log out at the inn, gaining rest.

Since rest XP is based on percentage, higher level characters will receive higher absolute rest xp. So the higher your level, the better rest is for you.

By having at least two characters, you can rest on one while playing the other! This is one pro of having alts.

As of patch 3.0.9, there is a glitch in the inn's bonus rest while logged out in that after you hearthstone to an inn, you have to leave the inn and re-enter before your character's icon indicates resting by glowing. It isn't immediately apparent because you don't receive the "20 seconds until logout" that you would in the wilderness. This doesn't seem to be a problem when hearthstoning to an inn within a major city.

World of Warcraft Beta
In the beta version of the original game, rest did not exist and experience was designed to prevent players from playing more than few hours in a row. Experience gained was divided by 50% after few hours. However, beta-testers did not like it and rest was implemented, giving instead 200% of experience for few hours, which Blizzard's developers later reported as being the "same numbers seen from the opposite point of view".