Ibn ‘Abbas said:
One makes atonement for something he has made unlawful for himself.* You have had a good example in God’s Messenger.
* i.e. something not in itself unlawful. It is treated like an oath for breaking which atonement must be made. The Prophet’s example refers to his withdrawing from his wives for a period.
(Bukhari and Muslim.)