It definitely can be done that way- just power down the modem before making the switch. This will make the modem let go of the IP address that was handed out to your PC and get a new one issued to the PS3 when powered up again. When you start setting up the connection on the PS3 stick with Easy for the IP setting, it should grab it automatically. The other information such as DNS servers should be available by checking out your connection details on the computer.
I've said it before- I would recommend using a router to share the connection and avoid the hassle of doing this switch every time you want one or the other to go online.