Test after each of the following steps that you haven’t already tried:
Step 1
Take all the steps suggested in this support article. That's the starting point for any further effort to solve the problem. Skipping any of those steps may mean that the problem won't be solved. Note that, as stated in the article, the computer will not sleep if some sharing services are enabled.
Step 2
From the menu bar, select
▹ System Preferences ▹ Accessibility ▹ Speakable Items: Off
Step 3
Select
▹ System Preferences ▹ Bluetooth ▹ Advanced...
and uncheck both boxes marked
Open Bluetooth Setup Assistant at startup if...
Step 4
Disconnect all wired peripherals and test. If you use a wired keyboard and/or mouse, use different ones. You must rule out the wired keyboard and mouse as possible causes of the problem.
Step 5
Reset the SMC.
Step 6
Start up in safe mode and log in to the account with the problem. You must hold down the shift key twice: once when you turn on the computer, and again when you log in.
Note: If FileVault is enabled in OS X 10.9 or earlier, or if a firmware password is set, or if the startup volume is a software RAID, you can’t do this. Ask for further instructions.
The login screen appears even if you usually log in automatically. You must know your login password in order to log in. If you’ve forgotten the password, you will need to reset it before you begin.
Safe mode is much slower to start and run than normal. Don’t launch any applications at first. If sleep still doesn’t work properly, back up all data and reinstall the OS. After that, if you still have the issue, make a “Genius” appointment at an Apple Store to have the machine tested.
If sleep now works as expected, go on to the next step.
Step 7
Still in safe mode, launch the usual set of applications that are running when you have the problem, including your login items, one at a time, testing after each one. Some applications may not work; skip them. You might be able to identify the cause of the problem this way.
Step 8
If sleep is still working after you’ve launched all the usual applications, restart as usual (not in safe mode) and test again. If sleep still works, you’re done, at least for the moment.
If you still have the sleep issue after restarting out of safe mode, post again.