this usually happens if the address for the site switches from not including www to including www
The cart contents are stored in a session. the browsing session is based on a cookie. The cookie that is set is set for the domain.
As far as cookies are concerned, the address:
www.mydomain.com
is not the same domain as:
mydomain.com
so both addresses get a separate browsing cookie and a separate session.
if a visitor comes to your site at:
mydomain.com
then goes to paypal and paypal redirects to:
www.mydomain.com
that will clear the cart since they are separate
The fix for this is to use an htaccess rule to to force none www traffic to the www domain. see this page for more details:
http://www.htaccessbasics.com/force-www-nonwww-domain/