To turn off powersave, add the following to /etc/modules, or create a file (8192cu.conf) in /etc/modprobe.d/ with the line(s):
# prevent power down of wireless when idle
options 8192cu rtw_power_mgnt=0 rtw_enusbss=0
Next reboot (or rmmod/insmod) it should disable the sleepy mode and your pi will be accessible all the time.
You can verify it's taken effect with
cat /sys/module/8192cu/parameters/rtw_power_mgnt, which should return 0.