Power off your device and wait 10 seconds before turning it back on. If your Internet connection stabilizes after restarting, there is a chance you may have previously been connecting to a Wi-Fi signal from a more distant access point, or on a frequency that is experiencing interference.
By restarting your wireless device, you are forcing it to select the closest access point and the best available wireless signal (ideally, connecting to your modem's highest-performance 5 GHz frequency signal).
Once your device is powered back on, go to the location where you were experiencing the problem. Has your issue been resolved?