Getting our son to sleep through the night was always hit or miss. There'd be those nights where I'd think everyone else was a whiner because he would do what you've described, but then there'd be those nights where all you craved was some sleep, and after hours of cycling through various things trying to get him content and ready for sleep, you'd see him close his eyes, tip toe back to bad, and then five minutes later he was up again seemingly recharged.